I found a way to apply media queries to IE using:
@media (-ms-high-contrast: none), (-ms-high-contrast: active) {
}
Is there a way do the same to apply CSS to all browsers but IE? Something like:
@media not( (-ms-high-contrast: none), (-ms-high-contrast: active) ) {
}
I'd like to avoid using the HTML tags.
Media Queries SupportCSS Media queries are supported in Internet Explorer (IE) 9+, Firefox 3.5+, Safari 3+, Opera 7+, as well as on smartphones and other screen-based devices. Although older versions of IE don't support media queries, still there is a way you can make it work.
Use a @supports
query for browsers that are not Internet Explorer. @supports
queries are compatible with all browsers except Internet Explorer.
@supports not (-ms-high-contrast: none) {
/* Non-IE styles here */
}
Example on Codepen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With