0

I have made my code changes and it renders perfectly in all browsers except for IE. Is there anyway to only change the CSS for IE to where the rest of the browsers won't be effected? Any input on this matter would be greatly appreciated!

Ryan
  • 103
  • 2
  • 8
  • 1
    Have you looked at this? https://stackoverflow.com/questions/28417056/how-to-target-only-ie-any-version-within-a-stylesheet – raflab Jul 23 '20 at 05:32

2 Answers2

0

You can't use your modern css properties like flexbox or grid with IE, you gotta check the availibilty of supported properties beforehand . However you can use it by using -ms- prefix.e.g display: -ms-flexbox;

Kiyubi
  • 57
  • 8
0

Do you want to target only IE in CSS? If so you could refer to below.

For IE 9 and prior versions, you need to load a conditional stylesheet like below:

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

For IE 10 and later versions, they don't support conditional stylesheet, so you have to use media queries like below:

@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
   /* IE10+ CSS */
}
Yu Zhou
  • 11,532
  • 1
  • 8
  • 22