nihalz
08-09-2007, 01:12 PM
Hi
I use an image whose width is 640px as a background using CSS...The image repeats itself vertically, and is positioned in the center.....
Everything looks fine if the browser's width is 640 or more..
But when i resize my browser window to less than the width of the background image, the background appears to shrink in width....so the content overlaps the background image....like this:
http://i10.tinypic.com/6f95fuh.jpg
Is there any way to prevent this? What am I doing wrong?
Here is my CSS code for the background:
body {background-color:#e8e8e8;background-image:url(bg3.gif); background-repeat:repeat-y;background-position: top; width:100%; height:95%;
}
BTW, this happens in Firefox & Opera...IE does not give me that problem...
I use an image whose width is 640px as a background using CSS...The image repeats itself vertically, and is positioned in the center.....
Everything looks fine if the browser's width is 640 or more..
But when i resize my browser window to less than the width of the background image, the background appears to shrink in width....so the content overlaps the background image....like this:
http://i10.tinypic.com/6f95fuh.jpg
Is there any way to prevent this? What am I doing wrong?
Here is my CSS code for the background:
body {background-color:#e8e8e8;background-image:url(bg3.gif); background-repeat:repeat-y;background-position: top; width:100%; height:95%;
}
BTW, this happens in Firefox & Opera...IE does not give me that problem...