The current live version of the CSS-Validator is broken, and is causing thousands and thousands of sites to be marred with the stigma of being invalid. If your site is using the box-model hack, in order for :IE: < 6 to correctly display your width-declared containers that have padding, margin, and borders, this affects you.
Basically, the common box-model hack involves using the voice-family CSS property, which IIR, is for screen readers, media type aural. What the latest version of the CSS-Validator has done, is made the use of that property invalid inside of a CSS stylesheet that is linked as a media-type for anything other than aural. In other words, it doesn’t belong in a CSS stylesheet that is linked for the screen media-type, nor the print media-type, etc. So, if your site doesn’t need a separate stylesheet for printing or other purposes, your fix is simple. Switch your media-type to “all”. If you have a print stylesheet, obviously, that won’t work; and if you try to import your print CSS after the first, hoping that inheritence will do the work for you, well, the browser will merge the two styles and your printouts will be max nasty.
Because of how this bug works, your CSS will still validate if your feed the validator the URI of your CSS fileas it won’t see the media declaration from your HTML. However, many clients of web developers trying desparately to work with CSS only layouts, and selling their services as being validatable (word?), won’t understand this, and will simply think you’re “working the system.” So, for the sake of all these individuals, you may consider doing the following:
the W3C, and ask them to fix the fifth bug mentioned in this October 2001 note to their validator mailing list.
I did it. For those guys, as recommended by A List Apart, and Jeffrey Zeldman. But, and I’m sure I won’t be popular for saying this, I don’t think it’s a bug, and I don’t think it should be fixed. Voice-family simply doesn’t belong in screen and print media stylesheets, and I think they’re correct to call it invalid as a result. There’s only one way, in my mind, that this will ever get better, and that’s for web designers to stop using this hack. As more and more developers turn to CSS and standards-based coding, if this hack wasn’t implemented, then :IE: 5.x users would see broken sites left and right, and maybe get the friggin’ point that it’s time to upgrade. As long as developers continue to coddle 5.x and (shudder) even 4.x users, it’ll never get better. There will be further stagnation and less of a sense of urgency among modern browsers to pull themselves together and implement CSS2 fully and accurately (as well as fix any CSS1 inconsistancies they still have.) Until then, they have no incentive to do so, as the message is loud and clear: Developers will work very hard to fix or get around our mistakes for us, so why bother?
Despite my feelings, I sent the email, to help those that are trying hard to practice good standards. Plus, the fifth bug mentioned in that note doesn’t recommend making it a valid and recommended practice, but rather turning it from an error, into a warning.
Posted Saturday February 7, 2004
in Web Development by Chris Curtis
This is an older entry and as such, it may be by a guest author or contain formatting problems / extraneous code. If you notice something wrong with the entry, please use the Contact page to let me know the entry title and issue.
Ah… the old “accomodate older/broken browsers or let them rot in hell” debate… not one that’s going to be decided anytime soon, if ever.
The problem is that 90+% of the people out there are using IE browsers and, realistically speaking, there’s not much chance at all of convincing the majority of them to switch. You might be able to convince the tech-savvy to switch to something else, but there’s no way you’ll convince the “mom and pop” users.
Those types of user will simply assume that it’s the site that’s broken and not their browser. “What do you mean there are other browsers? I thought you used Internet Explorer to look at the internet. Besides, I don’t even know how to install a new program or how I would switch to this new browser you suggest.”
Unfortunately.
By Chris Curtis on February 7, 2004 at 12:42pm link