Click to See Complete Forum and Search --> : Tile an <IMG> ?


RogerInHawaii
01-25-2010, 04:02 PM
I have an <IMG> on my page. I specify a height and width that is greater than the actual height and width of the image itself. When I do that it stretches the image to fit the height and width that I specify. Is there any way to tell it to TILE the image within the specified area, rather than stretch? I've seen code for doing this with the background image, but I just want it to be applied to the area of the <IMG> object, not the entire background.

jonmaster
01-25-2010, 04:07 PM
yes you can doit with the stylesheet inside a div tag

<div style="height:200px; width:200px; background:url(yourimage.jpg) repeat;"></div>

RogerInHawaii
01-25-2010, 04:10 PM
Excellent. Thank you!