[HTML/CSS] How to use a specified region of an image file as background?

Status
Not open for further replies.
Custom Title Activated
Loyal Member
Joined
Apr 11, 2005
Messages
1,048
Reaction score
9
G'day guys,

What I'm trying to do (if it's possible), is to specify a particular region of an image file to use as the background for a DIV or possibly a table cell, or another way that might work is to have the background offset by a particular number of pixels top and left, which would produce the same result...

So an image like this:

DaRcAntiX - [HTML/CSS] How to use a specified region of an image file as background? - RaGEZONE Forums


used to texture a table cell or similar element like this:

DaRcAntiX - [HTML/CSS] How to use a specified region of an image file as background? - RaGEZONE Forums


Is it possible? I've tried to research how to do it in a table cell or with css but no luck so far... I know it'd be easy if I just knew how :grin:
 
Okay... looks like another one of those things where you have to know the right thing to plug into google to get what you want.. "css background offset" did the trick this time, I was trying other queries about table backgrounds and crap before, doh @ wasted time :P


This page is all about exactly what I was trying to do:

A List Apart: Articles: CSS Sprites: Image Slicing’s Kiss of Death
 
Ok, since you've fixed it yourself I will close the thread now if you don't mind ;).
 
Status
Not open for further replies.
Back