I want to say something like
#mydiv { background-color: (IE ? red : blue) }
I believe this can be done with conditional comments but it will be ugly. Is there some other hack that is cleaner?
I want to say something like
#mydiv { background-color: (IE ? red : blue) }
I believe this can be done with conditional comments but it will be ugly. Is there some other hack that is cleaner?
The cleanest, least hacky way that I've seen to solve this is to ALWAYS load a special stylesheet specifically for various versions of IE.
Put all of your IE Version specific styling in those files. It may not look elegant at first but as you add more and more IE Version specific rules...it makes things infinitely easier.
...not to mention that you don't have to worry about browsers changing the way they handle the various loopholes people use to implement IE hacks.
I doubt you can get much less "ugly" than this:
Inside CSS file for all browsers:
After you have included that CSS file:
Of course, you can load a whole new stylesheet for IE.
You might want to consider the way that html5boilerplate uses:
html:
css: