Before: Tag Soup. After: CSS Clutter

In From Tag Soup to CSS Clutter, Martijn ten Napel talks about how browser specific hacks have moved from HTML to CSS.

I try to avoid using CSS hacks, but if that’s the only way to make an important part of a site work consistently across browsers, I’ll sometimes use stuff like the Box Model Hack or the Commented Backslash MacIE5 CSS Hack.

I dislike coding around browser incompatibilities, but I think doing it with CSS hacks is a lot better than using JavaScript browser detection, which will eventually break (and obviously fails when JavaScript is disabled), or server-side detection to send different HTML to different browsers. The CSS way, everybody gets the same HTML, which can be properly structured with semantic markup. So, if part of the page doesn’t look exactly the same in browser B as it does in browser A, that’s no big deal, since the content is there and is accessible.

Posted on August 3, 2003 in CSS

Comments are disabled for this post (read why), but if you have spotted an error or have additional info that you think should be in this post, feel free to contact me.