Is there css hack for all IE browsers. Not specific IE versions.
I tried
@media \0screen\,screen\9 {
body { background: green; }
}
but it doesn't work in IE7 and IE11.
As it is with every coding language, there are several shortcuts or hacks with CSS that allow you to write cleaner code, improve design elements, and save valuable time. Furthermore, you can directly insert these snippets to your site using a code editor.
Internet Explorer 10 & 11 : Create a media query using -ms-high-contrast, in which you place your IE 10 and 11-specific CSS styles. Because -ms-high-contrast is Microsoft-specific (and only available in IE 10+), it will only be parsed in Internet Explorer 10 and greater.
To fix CSS issues in IE11, we can use the following checklist to troubleshoot: Make sure that the HTML and CSS is valid - using W3C validator. Check that the CSS property is valid in IE11 using CanIUse. Use CSS resets (such as Eric Myers CSS reset, Normalize.
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="all-ie-only.css" />
<![endif]-->
more information can be found here: http://css-tricks.com/how-to-create-an-ie-only-stylesheet/
UPDATE as ElKabong mentioned in the comments and you will read while following the link..
Note that IE 10 and up DO NOT support conditional comments at all so this seems to be a bit of a nightmare and I have no easy way solution right now for that. But you can find more information while following the link mentioned above and also read trough the comments.
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