PDA

View Full Version : Background color in CSS


dthomsen8
03-19-2006, 03:56 PM
body {
padding-right: 0px;
padding-left: 0px;
padding-bottom: 0px;
margin: 0px;
padding-top: 0px;
background-color: #99CCCC;
font-size: 100%;
font-family: Arial, Tahoma, Helvetica, sans-serif
}
#header {
height: 110px;
background-color: white;
min-width: 740px
}

The W3 CSS Validator says that I have not specified a background color, but as a warning. What else could I specify here?

domedia
03-19-2006, 04:18 PM
It's not complaining about elements you already have background-color set, but for those that have none.

dthomsen8
03-19-2006, 04:25 PM
It's not complaining about elements you already have background-color set, but for those that have none.

Here is a screen capture of the warnings, with the code. What are they telling me? Do I need to make a change?

domedia
03-19-2006, 05:43 PM
Do you have body and #header defined in 2 places?
Paste in the full html code in code tags.

d a v e
03-19-2006, 07:15 PM
the validator says you haven't got a *COLOR* specified with your background colour (not the other way around) just specify a colour to avoid any nasty surprises for users with say pink or grey set as their default color.

the warnings are also just that: warnings. the validator only started flagging them up 6 months ago or so...