Instead of having HTML conditional comments load IE-specific stylesheets, you can use conditional comments to put content into the HTML, including different statements. In this case, I'm using three classes: .ie, .old_ie, and .ie_nine. If it's not IE, it uses a standard element with no class. Take a look at this block of code:
In the stylesheet, I have an INTERNET EXPLORER section down at the bottom and any IE specific code can refer to the .ie, .ie_nine, or .old_ie classes. For example, if my footer has a transparent background color, IE9 can handle it, but older IE can't, so I would refer to .old_ie footer { } in the IE part of the stylesheet.
Besides wanting to share... anybody know if this sort of trick is a bad idea?
Turns out, this is badly formatted HTML, but is Microsoft's badly formatted HTML, specifically for IE. Here's my updated version.. note the different HTML format between the IE and !IE lines.
Oddly, Boilerplate doesn't look like it includes a not-IE option and ends-up not having an HTML tag (it modifies the HTML tag instead of the body tag as I am.
In the stylesheet, I have an INTERNET EXPLORER section down at the bottom and any IE specific code can refer to the .ie, .ie_nine, or .old_ie classes. For example, if my footer has a transparent background color, IE9 can handle it, but older IE can't, so I would refer to .old_ie footer { } in the IE part of the stylesheet.
Besides wanting to share... anybody know if this sort of trick is a bad idea?
https://github.com/h5bp/html5-boilerplate/blob/master/index.html
I say go for it...IE conditionals are meant to hold specific IE content after all.
Oddly, Boilerplate doesn't look like it includes a not-IE option and ends-up not having an HTML tag (it modifies the HTML tag instead of the body tag as I am.