Jump to content


Online media matters

Living Can Kill You

Problems with hacks

Due to changes with the W3C’s CSS Validator (as detailed by Dave Shea and Jeffrey Zeldman), a very popular hack doesn’t validate. Though frustrating, the situation perfectly illustrates why, if it all possible, CSS hacks should be avoided. Ideally, one should use what I refer to as CSS filters — those tricks that exploit holes in a browser’s support (like the langauge pseudo-class selector), not bugs in its rendering engine.

Zeldman has updated his entry to clarify that the change may actually be a bug (and Doug Bowman suggests it may have been around since August 2003).

No matter the root cause, it still shows the problems we encounter while working with CSS in buggy browsers. If we rely on browser quirks to render things properly, it could come back to haunt us (I write this while rebuilding a site rife with nested tables and spacer graphics).

Of course, this is be no means an ideal world, so when using hacks be aware things may one day break.

Tuesday, Webstandards.TO discovered “we have truck.”