Browser Hacks
Internet Explorer
Conditional divs are used to target CSS rules to different versions of IE, which allows template developers to keep all of the styles for each asset in one CSS file. IE versions are targeted individually, with the exception of IE 5.5, which applies to 5.5 and below. The ids for the conditional divs are:
- ie8only
- ie7only
- ie6only
- lt-ie55
To target multiple versions, simply write #ie7.selector, #ie6.selector { css here; }
As a rule of thumb, place your browser hacks at the end of the stylesheet (or after the rule it's overriding) to ensure that the style takes effect without resorting to the !important declaration.
Keywords: browser hack ie6 ie7 ie8 compatibility