Click to See Complete Forum and Search --> : css validation
when validating my page with http://jigsaw.w3.org/css-validator/
i get Congratulations! Valid CSS! This document validates as CSS!
but with some warnings i dont understand.
he says : You have no color with your background-color : body
reffering to this:
body {
font : normal 12px arial, sans-serif;
background-color : #fafafa;
padding : 0;
margin : 7px;
}
what does it mean? how do i solve this?
Brollachan
01-23-2006, 08:04 AM
Basically it means you are missing an accompanying "color: ;" tag. So to prevent this message from showing it should read allong the lines of...
body {
font : normal 12px arial, sans-serif;
background-color : #fafafa;
color:#000000;
padding : 0;
margin : 7px;
}
johneva
01-23-2006, 08:05 AM
If that is the code you are using it dont make sence cos all the warning messege is saying is that you have not entered a value for background-color for body.
But acording to your CSS you have posted you have.
Brollachan is right!
but why must i have both bg color ant text color?
johneva
01-23-2006, 08:33 AM
Yeah I though he would be I started posting my messege just before he posted his messege so it was not there when I started.
I did not know that though it is a bit strage aint it but then hey it aint the only strange thing when it comes to CSS.
Charles
01-23-2006, 08:43 AM
Brollachan is right!
but why must i have both bg color ant text color?That's in case somebody has set their default text color to your background color. You can't make any asumptions about how your users have configured their browsers.
alexthecatta
01-24-2006, 03:46 AM
still with validation.
I got the same problem of the color and now it's solved.
Another thing i do not understand. I have this CSS code
#specifiche {
background-color:#CCCC00;
font-family:Arial, Helvetica, sans-serif;
color:#666666;
font-size:10px;
font-weight:900;
line-height: 1.5ems;
margin-right: 10px;
padding-top: 5px;
padding-left: 5px;
padding-right: 5px;
padding-bottom: 125px;
border-top: #666666 thin solid;
border-right: #666666 thin solid;
}
Abt the line-height it says
Invalid number : line-height Unknown dimension : 1.5ems
but i do not understand why...isn't ems a correct way to set lenghts? what should I put? pixels? or do i have to correct it in another way?
Charles
01-24-2006, 05:31 AM
1.5em
alexthecatta
01-24-2006, 08:09 AM
ahhhhhhh...super idiot... :o
thanks a lot