Re: CSS validation, contingent upon HTML validation?

Trevor Pierce wrote:

> To the W3C CSS Validation Staff:

I'm not W3C staff, but I'll try to answer anyway ;)

> Hello, my name is Trevor Pierce. I am currently working on a small
> personal website (wedding.continuumdesign.net,) and am also a wholesale
> believer in web standards. I am designing the site with validated HTML
> 4.01Transitional, but the CSS refuses to validate. I receive the same
> message
> each time:
> 
> To work as intended, your CSS style sheet needs a correct document parse
> tree. This means you should use valid HTML.
> 
> This is extemely frustrating, as the HTML IS valid. I am aware of two
> errors in the CSS that need to be fixed, as well as a variety of warnings.
> I'll take care of these, but my question is, once these errors are taken
> care of, will the CSS validate? It is important to me as a web designer
> (and perhaps moreso as a self-proclaimed standards perfectionist) that my
> pages be valid, credible information.
> 
> I cannot find a straight answer as to why the validator provides such a
> response, when the HTML has already been validated.

Your document is indeed valid and the CSS validation is performed as
intended. The message you are stumbling on, might be a bit confusing. The
CSS validator parses your document but does not validate it, so it cannot
tell you if it's valid or not. For invalid documents the CSS validator
might generate error messages that are not caused by invalid CSS code but
by the invalid HTML code. If you get CSS errors, check your HTML first
(what you have already done), before you try to correct CSS errors which do
not really exist. That's what the message is trying to tell you.


-- 
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/

Received on Sunday, 9 April 2006 12:44:09 UTC