May 11, 2004

Screw CSS Hacks.

Youngpup might have a decent idea in using conditional comments to serve up the proper stylesheet. It's a *feature* of IE. Seriously. I read about these conditional comments a while ago, but didn't give it much thought. I don't know why. But now that I have given it thought, it might be a real elegant solution. Now, the downside is that I'm maintaining two stylesheets. But that's not a big deal. I think I might rather have two easy to read style sheets than one hacked-to-hell-and-back stylesheets. Of course, I still have tried Dean Edwards most excellent IE7 javascript which could solve this problem as well. So the way I look at it, I'll code my next site for Mozilla. Then I'll apply one of these two solutions to it, and see what shakes out. Either one has to be better than those damndable CSS hacks.
Post Info

Tagged As CSS

Comments are Open (2)

Posted at 02:54 PM

Comments

Anonymous

If you go the route of two style sheets (my preference too if I can't get it working in one without hacks) you might find my post on Server Side CSS Sniffing useful: http://richardathome.no-ip.com/index.php?article_id=106

Jim

I've been experimenting with IE conditionals too lately, it does seem like an easier solution, for now. I'm having problems though. If I use the rule:

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Search
Comments on this post
Categories
Info
Tony Stephens
Copyright © 1995-2005
Site Version:
10
Licensed:
Creative Commons
Validate:
XHTML, CSS, 508, RSS
Subscribe
Blog-Fu, Link-Fu