I have a page that I've been building for a couple of days that I've finally finished. I have been using Safari to view the page, and it looks great in that browser.
Now that it's done, I thought I'd check it in other browsers, so first I tried Firefox (1.0). The page gives the body a background color using an external stylesheet and uses a container div for all of the actual content. Within the container div are five other major divs: header, mainnav, column, contents, and footer. The header contains a graphic banner and the mainnav and footer divs have the same background as the body.
The container div is set in the stylesheet to have a white background. Here's the rule for the container div:
#container
{
margin: 1em auto;
width: 700px;
text-align: left;
background-color: FFFFFF;
}
Neither column nor contents have a background-color rule in them. In Safari, all three of these divs show a white background, I'm assuming because their parent div, container, has the white background. But in Firefox and IE (5.2 for Mac OS X), each of them display the column and contents divs with the body's background.
As an experiment, I added the background-color: FFFFFF rule to both the column and contents rules, but Firefox and IE still show the body background color. Now I'm trying to think of a workaround for this, perhaps a white image swatch that repeats for these two divs?
Thanks,
ChuckDunno if this helps at all, but it should be...
background: #ffffff;
You're missing the hash mark, and that might be the cause of your trouble.
Now that it's done, I thought I'd check it in other browsers, so first I tried Firefox (1.0). The page gives the body a background color using an external stylesheet and uses a container div for all of the actual content. Within the container div are five other major divs: header, mainnav, column, contents, and footer. The header contains a graphic banner and the mainnav and footer divs have the same background as the body.
The container div is set in the stylesheet to have a white background. Here's the rule for the container div:
#container
{
margin: 1em auto;
width: 700px;
text-align: left;
background-color: FFFFFF;
}
Neither column nor contents have a background-color rule in them. In Safari, all three of these divs show a white background, I'm assuming because their parent div, container, has the white background. But in Firefox and IE (5.2 for Mac OS X), each of them display the column and contents divs with the body's background.
As an experiment, I added the background-color: FFFFFF rule to both the column and contents rules, but Firefox and IE still show the body background color. Now I'm trying to think of a workaround for this, perhaps a white image swatch that repeats for these two divs?
Thanks,
ChuckDunno if this helps at all, but it should be...
background: #ffffff;
You're missing the hash mark, and that might be the cause of your trouble.