This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Stylesheets > November 2006 > background color CSS validation warning





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 background color CSS validation warning
Haines Brown

2006-11-05, 11:33 pm

A minor issue. When I try to validate a CSS line, I get an error.

The line inside the style for a div is

background-color: #FFFBF0;

The warning (jigsaw.w3.org) is:

Line : 54 (Level : 1) You have no color with your background-color
: #inside

What's up?

--

Haines Brown, KB1GRM
Dialectical Materialist


Els

2006-11-05, 11:33 pm

Haines Brown wrote:

> A minor issue. When I try to validate a CSS line, I get an error.
>
> The line inside the style for a div is
>
> background-color: #FFFBF0;
>
> The warning (jigsaw.w3.org) is:
>
> Line : 54 (Level : 1) You have no color with your background-color
> : #inside
>
> What's up?


Literally: you haven't set a colour (for the text) to accompany that
background colour. The validator just gives you a warning, to make
sure you didn't do that by accident. What if you set the background
colour to black, and forgot to change the default black colour for the
text to something more visible against a black background? Rule of
thumb: Always set the colours (background and text) in sets, so you
know for sure there is enough contrast between them.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
dorayme

2006-11-05, 11:33 pm

In article <87lkn6ohxu.fsf@teufel.hartford-hwp.com>,
Haines Brown <brownh@teufel.hartford-hwp.com> wrote:

> A minor issue. When I try to validate a CSS line, I get an error.
>
> The line inside the style for a div is
>
> background-color: #FFFBF0;
>
> The warning (jigsaw.w3.org) is:
>
> Line : 54 (Level : 1) You have no color with your background-color
> : #inside
>
> What's up?



The idea is that you may get an unexpectedly clashing or hard to
read or unappealing colour for "text" on top of the background,
inherited unexpectedly or via a user stylesheet.

--
dorayme
Haines Brown

2006-11-05, 11:33 pm

Els <els.aNOSPAM@tiscali.nl> writes:

> Haines Brown wrote:
>
>
> Literally: you haven't set a colour (for the text) to accompany that
> background colour.


Very interesting; never would have guessed. Thanks.
--

Haines Brown, KB1GRM
Dialectical Materialist


Sponsored Links


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