Real World Style

css layouts, tips, tricks, and techniques

Giraffe peeking over the image...

« Speaking in San Francisco | Main | Safari Bug »

February 05, 2004

CSS Validator Broken

Jeffrey Zeldman points out that the CSS validator is incorrectly labelling sites that use Tantek Çelik’s Box Model Hack, and specify a media type of "screen", invalid. See, for example the CSS Validator’s report on A List Apart. At issue is the possible conflict of an aural declaration in the midst of a screen CSS file. Doug Bowman points out that it should not return an error, but rather a warning. He suggests we take the opportunity to be a bit rebellious. That may be fine for personal sites, like blogs and such, but clients to whom you’ve promised valid sites may not relish the thought.

Dave Shea points out that you can route around the CSS validator by sending it the URL to the CSS file, rather than the (X)HTML file that applies it. This works unless you use multiple CSS files.

Other, potentially labor intensive options are outlined in Jeffrey’s post, and when it gets posted to A List Apart tomorrow, I’m sure there will be other ideas about what you can do.

Personally, I try to avoid the hack as much as possible, designing around it where I can.

Posted by Mark on February 5, 2004 01:50 PM