Source : How To Create an IE-Only Stylesheet, Conditional comments.
En complément : Browserhacks – An extensive list of browser specific CSS and JavaScript hacks from all over the interwebs.
Ajouter une classe à l’élément body
pour IE uniquement
1 2 3 4 5 6 |
<!--[if IE ]> <body class="ie"> <![endif]--> <!--[if !IE]>--> <body> <!--<![endif]--> |
1 2 3 4 5 6 |
<!DOCTYPE html> <!--[if IEMobile 7 ]> <html dir="ltr" lang="en-US"class="no-js iem7"> <![endif]--> <!--[if lt IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie6 oldie"> <![endif]--> <!--[if IE 7 ]> <html dir="ltr" lang="en-US" class="no-js ie7 oldie"> <![endif]--> <!--[if IE 8 ]> <html dir="ltr" lang="en-US" class="no-js ie8 oldie"> <![endif]--> <!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html dir="ltr" lang="en-US" class="no-js"><!--<![endif]--> |