Click to See Complete Forum and Search --> : validation errors, i dont understand...
k0r54
11-23-2005, 11:50 AM
Hi,
I have two css validation errors i dont understand: -
1. (Level : 1) You have no background-color with your color : #promotions a:visited
2. font-family: You are encouraged to offer a generic family as a last alternative : #promotions a:visited
#promotions {
position:absolute;
top:83px;
right:0px;
width:213px;
height:124px;
padding-left:3px;
border-left:1px solid #0BB978;
}
#promotions p, #promotions a, #promotions a:visited {
margin:0;
padding:2px;
color:#000000;
font-family:Verdana;
font-size:10px;
}
LiLcRaZyFuZzY
11-23-2005, 12:26 PM
#promotions p, #promotions a, #promotions a:visited {
margin:0;
padding:2px;
color:#000000;
background-color: transparent;
font-family:Verdana, sans-serif;
font-size:10px;
}
k0r54
11-23-2005, 12:27 PM
thank you but why does it need a font family? and why does it need a bg?
Sorry for the q's?
Thanks
k0r54
LiLcRaZyFuZzY
11-23-2005, 12:34 PM
the validator only "adviced" you to add a generic font-family, so the text will still be displayed if the user doesn't have "Verdana" installed.
Hmm, i guess you should always specify a background color, particularly if you specified a font color, but take it as a habit, because different browsers may have different default background color
coothead
11-23-2005, 12:49 PM
Hi there k0r54,
I don't believe that background-color:transparent will remove the warning.
You should use hex, rgb, valid named colors or inherit.
coothead
LiLcRaZyFuZzY
11-23-2005, 12:56 PM
Actually it will
http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-color
This property sets the background color of an element, either a <color> value or the keyword 'transparent', to make the underlying colors shine through.
coothead
11-23-2005, 01:37 PM
Hi there LiLcRaZyFuZzY,
I am not questioning the existence of background-color:transparent;. :)
I am just saying that it will produce the warning...
You have no background-color with your color.
coothead
LiLcRaZyFuZzY
11-23-2005, 02:03 PM
right! ;)
k0r54
11-23-2005, 02:28 PM
yes, that was actually right, it all validates now :)
Thanks
k0r54