Teaching CSS hacks without context

Warning This article was written over six months ago, and may contain outdated information.

Looking through the popular links on del.icio.us I found a page of tips for CSS: CSS Hacks & Issues.

Most of the tips are useful, if a little familiar by now, but their first one bugged me: Browser‐Specific selectors. As you’ve probably inferred, it shows you how to use CSS hacks in order to provide browser‐specific code. My problem is this: many people — myself included — think you shouldn’t use CSS hacks.

It’s an ongoing argument, but certainly in the case of Internet Explorer there’s no need for hacks when you can use conditional comments.

I think that if you’re teaching how to use CSS hacks, at the very least you should be linking to the arguments against their use.

Comments are closed.