Joern Bargmann's Lifestream - tagged with hack http://absorbed-in-thought.com/feed en-us http://blogs.law.harvard.edu/tech/rss Sweetcron joernba@gmail.com paulhammond.org: Conditional classnames http://absorbed-in-thought.com/items/view/51/paulhammondorg-conditional-classnames

Interesting use of conditional comments: If you use this HTML: <!--[if IE ]> <body class="IE"> <![endif]--> <!--[if !IE]>--> <body> <!--<![endif]-->

with CSS that looks something like: div.foo { color: inherit; } .ie div.foo { color: #ff8000;

then you get all of the advantages of using conditional comments to work around problems in Internet Explorer, without the extra HTTP request of an IE-only stylesheet.

(From paulhammond.org: Conditional classnames.) Via Twitter (Simon Willison)

]]>
Fri, 17 Oct 2008 14:57:00 +0200 http://absorbed-in-thought.com/items/view/51/paulhammondorg-conditional-classnames