By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,676 Members | 1,763 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,676 IT Pros & Developers. It's quick & easy.

100% height, background colors, and Mozilla

P: n/a
M2
Hi All,
I am using a div with a 100% height (within a document with body with body
and html set to 100% too) as a method of getting some colored bars down the
side. This seems to work just fine in IE and mostly fine in Mozilla but
there's a hitch. Mozilla isn't doing the background for #content elements
below the fold. Anything below the first screen full has the background from
the body and not #content.

I'm coming up short in ways I can get around this. Anyone have any ideas?

html, body {
height: 100%;
margin-top: 0;
margin-bottom: 0;
margin-left: 10px;
margin-right: 10px;
background: #95C8FF;
}

#content {
height: 100%;
background: #fff;
}

....
<body>
<div id="content">Stuff with white background</div>
</body>
....

Matt.
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
In article <0n****************@news.optus.net.au>,
"M2" <m2@nowhere.com> wrote:
I am using a div with a 100% height (within a document with body with body
and html set to 100% too) as a method of getting some colored bars down the
side. This seems to work just fine in IE and mostly fine in Mozilla but
there's a hitch.


Mozilla does this differently in the quirks and standards modes. The
behavior in the standards mode is believed to be correct. Which mode are
you using?

--
Henri Sivonen
hs******@iki.fi
http://iki.fi/hsivonen/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.