CSS - Targeting IE

CSS - Targeting IE

  

Hello,

I want to apply some css to target IE 10,11 and I'm using the following media query but it's not working. 


@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.toOSForum {
        width: 52px;
    }
}

Does anyone know another solution?

Thanks

Hi Filipa,

For 9 and lower

<!--[if IE]>
  <link rel="stylesheet" type="text/css" href="all-ie-only.css" />
<![endif]-->

For 10 and 11

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
     /* IE10+ CSS styles go here */
}


For Edge

@supports (-ms-accelerator:true) {
  /* IE Edge 12+ CSS styles go here */ 
}


Hope it will help you.


Regards,

Pankaj Pant