CSS Hacks for IE

1. November 2010 18:24

The following are a few techniques you can use to target specific IE versions via CSS markup.

    property:  valueA;   /* all browsers, of course */
    property:  valueB\9; /* IE9 and below, the 9 has nothing to do with the version in place */
    *property: valueC;   /* IE7 and below */
    _property: valueD;   /* IE6 */

/* IE6 ONLY */

/* IE7 ONLY */
    *:first-child+html TAGIDENTIFIER

/* Modern Browsers & IE7+ */
    html>body TAGIDENTIFIER

I would like to point out that using IE conditional comments is still the best way to address specific browsers, it's just worthwhile to know about these techniques.


Comments are closed


Michael J. Ryan aka Tracker1

My name is Michael J. Ryan and I've been developing web based applications since the mid 90's.

I am an advanced Web UX developer with a near expert knowledge of JavaScript.