187
Views
1
Comments
CSS - Targeting IE
Question

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

2018-08-26 20-34-32
Pankaj pant

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




Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.