Targeting IE using conditional comments html class (test with IE)
This html checks if the browser is IE, then add a CSS class with the IE version to the <html> tag.
- Standard browsers: will display this box as gray background
- IE8: pink background
- IE7 or IE 8 with Compatibility View: green background
- IE6: blue background