Is there a simple way to target CSS for IE10 and below? While IE11 is working fine with the CSS I'm using, I need to add specific styles for versions lower than that.
I am aware of the method for targeting up to IE9:
<!--[if IE 7 ]> <html class="ie7"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->
<!--[if IE 9 ]> <html class="ie9"> <![endif]-->
However, conditional comments do not work in IE10. Also, specifying IE9 in the content meta tag is not an option as I prefer utilizing IE11/Edge by default. I want to move forward without getting stuck in the past!
Using IE-specific media queries is not viable either, as they would apply the styles to IE11 as well, which is something I wish to avoid. My intention is to target versions below IE11 only because I have a separate set of 'fallback' styles to be applied when the primary 'correct' CSS cannot be rendered on these browsers.
I also attempted a different approach - setting the fallback CSS as default and then specifically targeting:
IE11+ using _:-ms-fullscreen :root
Chrome using
@supports (-webkit-appearance:none)
Firefox using
@supports (-moz-appearance:meterbar)
Unfortunately, this method did not yield the desired results. Although Chrome and Firefox displayed the specific styles correctly, IE11 still retained parts of the default CSS. Additionally, both Chrome and Firefox encountered various issues with the overall site styling.
Any suggestions on how I can exclusively target IE10 without affecting IE11?
Thank you!