Search code examples
htmlinternet-explorerconditional-comments

Can I use "if lt IE9" in conjunction with "if IE 8"?


Can I use if lt IE9 in conjunction with if IE 8, in this manner:

<!--[if lt IE 9]><script src="html5shiv.js"></script><![endif]-->
<!--[if IE 8 ]> <html class="ie8"> <![endif]-->

I'm asking since the second condition is contained in the first one, maybe this could cause some glitch in one of the browsers?


Solution

  • Yes it should work fine, and the order doesn't matter, ie will parse all the rules and execute any that matches