Last active
June 11, 2022 22:25
-
-
Save bzerangue/4a412366ea5e4b96da9ff64add8d598f to your computer and use it in GitHub Desktop.
Targeting IE Only - CSS Media Query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- IE 9 and below... --> | |
<!--[if IE]> | |
<link rel="stylesheet" type="text/css" href="ie9-and-below.css" /> | |
<![endif]--> | |
<!--[if !IE]>--> | |
This is not revealed in IE 5-9. It's still revealed in other browsers. | |
<!--<![endif]--> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | |
#myElement { | |
/* Enter your style code for IE10 and IE11 */ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IE Conditional Comments is only for IE9 and below.
IE Media Query is to target IE10 and IE11.