Forum Moderators: not2easy
I am using the following line of code to style my "container" div in my style sheet:
#container {
background: url(images/bg_container.gif) repeat-y top center;
}
But this is only working for IE. I can't see the background image at all in FireFox and Opera. I have tried the following as well which has the same result:
#container {
background: url(http://www.myURL.com/images/bg_container.gif) repeat-y top center;
}
When I try this:
#container {
background: url(../images/bg_container.gif) repeat-y top center;
}
The image is lost from all browsers. Has anybody come across this before or is aware of a fix?
Thanks
If so, IE will incorrectly enclose un-floated child elements in this element, giving it (the floated element) a non-zero height, and therefore showing the background image.
In standards-compliant browsers a floated element will (correctly!) fail to enclose child elements unless they are floated or (possibly) unless you've fiddled with the 'overflow' property of the floated element. This often means that the floated parent element has a computed height of zero, and so your background image does not appear.
-b