Forum Moderators: not2easy

Message Too Old, No Replies

CSS Backgrounds in Firefox - BODY and DIV

CSS Backgrounds not showing correctly in BODY and DIV

         

bsuneja

8:28 pm on Jul 22, 2008 (gmt 0)

10+ Year Member



I have a background image and color in the BODY tag.
The Content tag sets the background color to white again.

Shows OK in Internet Explorer, but FireFox doesn't show the Content DIVs with white background. The BODY's background color continues.

The DIV wraparound thing many posts refer to is applicable when there are two DIVs, but in my case inserting the :allow tag in BODY doesn't make any difference to the Content DIV.

These can be seen at:
<snip>

Any thoughts on how to fix this? (From what I've read, this could actually be a "bug" in IE - and it supposedly isn't showing the right thing... (although that's exactly the result I want in IE and Firefox... :).

[edited by: DrDoc at 6:17 pm (utc) on July 23, 2008]
[edit reason] No URIs, please. See posting guidelines. [/edit]

Fotiman

11:53 am on Jul 24, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Please post come code.

swa66

2:23 pm on Jul 24, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The trick to avoid IE does what I want, but IE is using a bug to show me is simple: do not look at your code in IE till you get it working in standard compliant browsers.

Fotiman

2:50 pm on Jul 24, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



body {
background: #fff url(yourimage.png)
}
#Content {
background: #fff;
}
<body>
<div id="Content">
...
</div>
</body>