Holly-Hackin'

Posted on 08/24/2008 @ 03:52PM

We all hate using CSS hacks as a quick fix; a hack is never better than a real solution. But we all know that when it's crunch time, it can be a necessary (and hopefully temporary) evil, especially when working with our bastard stepchild beloved, but flawed Internet Explorer.

One downside (among others) to using css hacks is that they're a quick way to stop our stylesheets from validating. As soon as you throw any of these in:

*font-size: 1.1em;
_display: inline;
-margin: 0;

Jigsaw will go kablooey. Using the Holly Hack, however, keeps all the hacky styles hidden, so the following will validate:

/* \*/ 
font-size: 1.1em;
display: inline;
margin: 0;
/* \*/ 

..and it will still be ignored by standards-compliant browsers.

So use your noodle - hack responsibly.