unch wrote:
> Hi,
> 
> I'm trying to validate my css file to CSS2. I get a bunch of warnings 
> along the lines of:
> 
> # Line : 43 Level : 1 You have no background-color with your color : a:link
> 
> where A:LINK is defined like this:
> 
> a:link { color:#000000; }

The reason for the warning is that the user may have a user stylesheet 
saying something like:

a:link { color:#ffffff; background-color:#000000; }

Your style rule would only override part of that, makeing links unreadible.

> I would like A:LINK to inherit the background color of BODY. How do I do 
> this without getting the above warning? Naively, I tried:
> 
> background-color: body.style.background-color
> 
> But it has no effect and doesn't validate.

try

background-color: inherit

or

background-color: transparent

See: http://www.w3.org/TR/REC-CSS2/colors.html#propdef-background-color

It looks like you are trying to mix Javascript syntax and CSS, which 
won't work.

Tim.


Reply via email to