Search code examples
htmlinternet-explorerconditional-comments

Can <!--[if lte IE 8]> even work in IE6?


I am just about at making my website compatibility, and with IE, the old jerk, I need to use

<!--[if lte IE 8]>

<![endif]-->

However, as "lte IE8" means "equal to or less than IE8", how can IE6 even read this ?

Also, is it lt or lte ? http://www.quirksmode.org/css/condcom.html refers both, though only lte in it's definition.


Solution

  • To answer one part of your question, which no-one seemed to answer explicitly and I have been trying to figure out ...

    is it lt or lte?

    Without realising what lt and lte are, you might be unsure which to use, however from reading other comments, I realised that lt = less than and lte = less than or equal to (similary gt and gte are greater than and greater than or equal to), so it depends which versions of IE you want the rule to apply to as to whether you use lt, lte or a combination.