[thelist] W3C CSS Validator. Am I missing something?

Tony Crockford tonyc at boldfish.co.uk
Sat Jul 13 08:57:01 CDT 2002


> > Basically it means that it is good practise to always set a color:
> property
> > whenever you set a background-color. If you want to keep
> the same color
> > throughout just chuck in "color: inherit" and the warnings
> will go away.
> >
> > Regards,
> >
> > Simon Willison
> You are right, they are warnings, not errors. Since they are indeed a
> different color than the main background color so I will have
> to keep them
> as they are.

Daniel,

I think you're still missing it.

The errors/warnings refer not to the background-color but the missing
foreground color:

in each of your #ID blocks you need to set color: somecolor;

Or if all the foregrounds text is the same color use inherit as Simon
suggested.



e.g:

#main {
	background-color: #FFCC99;
	border: 1px solid #000000;
	color: #000000; /*or set to inherit */
	margin-bottom: 5px;
	margin-left: 5px;
	margin-right: 232px;
	margin-top: 10px;
	position: inherit;
	top: 10px;
}

While on the topic can I recommend Topstyle 3.0?

It makes editing/creating stylesheets much easier and will vaildate them
with a much better explanation of errors.

find it here:

http://www.bradsoft.com/topstyle/

Hope this helps

Tony




More information about the thelist mailing list