This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > December 2005 > CSS validator warnings background-color





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author CSS validator warnings background-color
Ed Mullen

2005-12-13, 11:40 pm

Ok, I get the thing about specifying color and background-color
together. So I specify:

background-color: transparent;

in my CSS file. And I still get the warning.

The CSS file is: http://ed.mullen.home.comcast.net/styles/ahs.css

The warning is:

Line : 41 (Level : 1) You have no background-color with your color : #logo_1

If I specify a color (e.g. #fff;) the warning goes away. So, is
transparent an illegal value? Doesn't seem to be according to:

http://www.w3.org/TR/REC-CSS2/colors.html
http://www.w3schools.com/css/pr_background-color.asp

Color me confused.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
I was simply furnishing a home. I love music ... and I don't think a
$130,000 indoor-outdoor stereo system is extravagant. - Leona Helmsley
Chris Beall

2005-12-13, 11:40 pm

Ed Mullen wrote:

> Ok, I get the thing about specifying color and background-color
> together. So I specify:
>
> background-color: transparent;
>
> in my CSS file. And I still get the warning.
>
> The CSS file is: http://ed.mullen.home.comcast.net/styles/ahs.css
>
> The warning is:
>
> Line : 41 (Level : 1) You have no background-color with your color :
> #logo_1
>
> If I specify a color (e.g. #fff;) the warning goes away. So, is
> transparent an illegal value? Doesn't seem to be according to:
>
> http://www.w3.org/TR/REC-CSS2/colors.html
> http://www.w3schools.com/css/pr_background-color.asp
>
> Color me confused.
>


Ed,

Transparent is valid, but does not resolve the validator's concern that
the user may have assigned a background color which is incompatible with
your new foreground color.

It's a warning, not an error. If transparent is appropriate to your
situation, leave it.

Chris Beall

Ed Mullen

2005-12-13, 11:40 pm

Chris Beall wrote:
> Ed Mullen wrote:
>
>
> Ed,
>
> Transparent is valid, but does not resolve the validator's concern that
> the user may have assigned a background color which is incompatible with
> your new foreground color.
>
> It's a warning, not an error. If transparent is appropriate to your
> situation, leave it.
>
> Chris Beall
>


Thanks, Chris, for the explanation.

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews