Forum Moderators: not2easy

Message Too Old, No Replies

IE7 losing Body background color

IE7 css background-color body tag

         

CoroRon

3:15 am on Oct 18, 2007 (gmt 0)

10+ Year Member



Hi

We have some sites using css which work fine in IE6 and Firefox but have an irregular issue in IE7. Seems that sometimes the page background color resolves OK and other times it doesn't (ie white, not colored as it should be). If the page opens from a link on the page or menu option, often it doesn't resolve. If I do a page refresh it is usually OK. Very erratic.

The rest of the css formatting etc looks OK

Doc type is
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

CSS and HTML validate fine. I have tried to always create "clean code" with no fixes, hacks or workarounds.

The body css code is

body {
margin:0px; background-color:#C0DFFD
}

I'll send a link to the site, css file etc for anyone who wants it. Seems this is another little MS brainteaser to keep us on our toes. Looks like there are a few with IE7. Any help for this relative newbie appreciated.

Thanks
CoroRon

ebby

2:00 pm on Oct 18, 2007 (gmt 0)

10+ Year Member



Hopefully in the actual style sheet you have a semi-colon after your hex value. I haven't had any problems like the one you're describing.

CoroRon

10:30 pm on Oct 23, 2007 (gmt 0)

10+ Year Member



Can I sticky the url to you to see what it looks like there?