17 points · by mckamey · 15y ago · 9 comments
In the example they have IE5&6 specific code:
.ua-ie-5 .logo-area,
.ua-ie-6 .logo-area
{
/* IE versions < 7.0 don't fully support transparent 24-bit PNGs */
background-image: url(logo.gif);
}
But wouldn't it be more sensible to have something like this: .no-png-support
{
background-image: url(logo.gif);
}
That way you hit all relevant browsers... not just the ones whose quirks you know about?Why would I ever want to use this instead of something like modernizr.js?
I didn't want to spend 3 hours finding the root cause or the most elegant solution to this annoying little problem. So I just did _line-height:20px and it lined up perfectly in IE. And I used jQuery.browser.opera and addClass(".fixopera") to make sure it worked in Opera. Detecting the box-model etc. could help if it was related to box-model issues. When text and images just don't line up, what should I use?
http://paulirish.com/2008/conditional-stylesheets-vs-css-hac...