CSS Code Snippets To Make You A Better Coder
designyourway.net
designyourway.net
Regarding hacks specifically: if you feel like you need to use hacks, at least try to understand how they work and the problem they solve. i.e: don't just throw something out there to solve IE problems if you don't know what they mean. It's amazing how many people use box model hacks in their code but don't even know how the box model actually works. It is certainly one part of the spec that isn't really obvious for most people, but copying/pasting a few lines will certainly not make you a better coder.
In my view its better to do that than use hacks.
BTW the article is mostly useless for any practical use. If you really want to target IE6/IE7, this article [2] is a nice start. Learn about what types of bugs IE support and try to remember the name of the bug so that you can google a fix for it when you actually encounter one. As others suggested here, try to understand at least the basics of box model and how it is different in IE, but don't try to get a PhD in any IE bug you encounter. Fix it as fast as you can using whatever easy way out you can see an move on. There are better things to do in life.
[1] https://github.com/rafaelp/css_browser_selector/
[2] http://www.virtuosimedia.com/dev/css/ultimate-ie6-cheatsheet...
Those random CSS hacks should always work as they are relying on the specific functions of the UA which can not be altered (though they might clash with new browsers, * html anyone?), whilst as a sibling comment notes UA can be easily modified.
Both methods are flawed equally IMO.
<!--[if lt IE 7]><html lang="en" class="no-js ie ie6"><![endif]-->
<!--[if IE 7]><html lang="en" class="no-js ie ie7"><![endif]-->
<!--[if IE 8]><html lang="en" class="no-js ie ie8"><![endif]-->
<!--[if IE 9]><html lang="en" class="no-js ie ie9"><![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html lang="en" class="no-js"><!--<![endif]-->
Edit: And then remove the 'no-js' class with jshttp://paulirish.com/2008/conditional-stylesheets-vs-css-hac...
In other words - stay with a conservative font stack or do on the fly font detection and restyle the document respectively.
Instantly stopped reading, what kind of freak writes about that.
Also, sigh.