I have been using the following trick to make browser-specific HTML:
<!--[if (IE)]> <div class= "ie"> <![endif]-->
<!--[if !(IE)]><!--> <div class= "not_ie"> <!--<![endif]-->
</div>
This does not work with IE11. Any new tricks to use?
I can detect it using JavaScript:
Detecting IE11 using CSS Capability/Feature Detection
or
Object.hasOwnProperty.call(window, "ActiveXObject") && !window.ActiveXObject)
but I'm hoping to avoid that.
IE 11 does not longer support conditional comments in your HTML code. So you have to use Javascript.
Microsoft Dev Center - IE 10+ Conditional 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