A CSS hack should (or MUST in the RFC2119 sense if you prefer):Tantek goes on to correctly state that IE7 will NOT remove the need for such hacks. What is most interesting about the article is to see how the hacks and the need for them evolved over time.
- Be valid. Invalid hacks are unacceptable. Back in the heyday of Web 1.0 (i.e. the late 1990s), the The Web Standards Project and numerous others were already spreading the message of better coding through validity, and thus hacks themselves had to validate as well. (Nevermind that many/most so-called "Web 2.0" sites can't be bothered to validate. See above about the real professionals having to repeat the message).
- Target ONLY older/frozen/abandoned versions of user agents / browsers. When the Box Model Hack was introduced, we were already playing with betas of IE6/Windows (back when we expected there would be an IE6/Mac), and so we knew how to make sure it wasn't affected. And now we're playing with betas of IE7.
- Be ugly. It's actually a good thing that a hack be visually ugly from a coding aesthetic point of view in the hopes that the ugliness will be a reminder that the hack is a hack, and should incite a tendency for people to a) minimize it's usage, and b) remove it's usage over time. At it's core, browser switching is one of those things you really shouldn't, but must, do to get your job done. Hacks' ugliness are like the equivalent of persistent warning tags, a reminder to dispose of them when no longer necessary.
What really amazes me is that browser programmers and email vendors continue not to fully support the CSS2(.1) specification. The lack of support is more troubling with the emergence of Firefox as a true, and some would say better, alternative to IE. With the death of Netscape earlier this decade, most developers began to be able to develop for the IE platform only. While this may not have been a perfect platform to work with, it's flaws were well known and you could easily work within those limitations to accomplish what you wanted to. Now, you have to code to the standard and then hack the CSS to get it to work in IE. This can be extremely frustrating, especially when things look so much better in Firefox.
via Scobleizer
Created 10/26/2009 11:12:20 PM email | website
Can you tell me about IE mac css hacks?