...

View Full Version : problem in background image



san_crazy
03-09-2009, 01:53 PM
i want to put a background image for a <div> element. the image I have made is longer than size of <div> element hence the image doesn't fit properly inside this element.
In second try, I made that image little shorter than the size of <div> element and the problem is still there.

I there any setting in <div>'s style so that the background image would be auto resized to fit properly inside it?

jpolo9
03-09-2009, 02:04 PM
Can you post your code or a link? the problem doesn't seem to be resizing the background image although you could set the overflow or possibly the repeat values.

abduraooft
03-09-2009, 02:25 PM
I there any setting in <div>'s style so that the background image would be auto resized to fit properly inside it?
Resizing background image using CSS is possible, but it's supported in CSS3 only (http://www.w3.org/TR/css3-background/#the-background-size).
Though you may fake it by using an absolutely positioned img tag, and some z-index, see http://www.cssplay.co.uk/layouts/background.html



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum