0

I am writing a ie9 specific css property. but it affets ie10 too..

how to avoid this?

here is my property:

.back { visibility:visible; }

:root .back { visibility:hidden\0/IE9; }

i am viewing the result using the ie document mode.

3gwebtrain
  • 14,640
  • 25
  • 121
  • 247
  • I just googled `\0/IE9` and the [first result](http://stackoverflow.com/questions/7364891/how-to-define-specific-css-rules-for-ie9-alone) pointed me to an [article](https://davidmurdoch.com/2011/05/13/ie9-only-css-hack/) that explains `\0/IE9` applies to IE10 as well. You need to work on your research/googling skills. Your best bet is conditional comments instead, see here: http://www.quirksmode.org/css/condcom.html – Christian Jan 07 '15 at 07:47

1 Answers1

1

The below should target IE9 only (and not IE10 etc as :root does):

@media screen and (min-width:0) and (min-resolution: .001dpcm) { 
 // IE9 CSS
 .back{visibility:hidden;}
}
SW4
  • 69,876
  • 20
  • 132
  • 137