Forum Moderators: open

Message Too Old, No Replies

IE conditional comments not quite working

         

delerious

6:52 am on Dec 26, 2003 (gmt 0)

10+ Year Member



I'm trying to use some conditional comments with IE 5.0, and they're not quite working. The browser version number is 5.00.2614.3500.

Here are the conditional comments I have tried, and whether or not they work:

<!--[if IE 5]> this one should work, and it does work
<!--[if IE 5.0]> this one should work, but it does NOT work
<!--[if IE 5.0026143500]> this one should work, but it does NOT work
<!--[if IE 5.2]> this one should NOT work, but it DOES work

It looks like IE is ignoring the zeros after the 5, so that is why the check for 5.2 works. Does this mean that if there is a build of IE 5.0 with version number 5.00.5321.5900, then that build of IE 5.0 will pass a check for 5.5?

I have some HTML that must be displayed for IE 5.0 and not IE 5.5. So I cannot use the <!--[if IE 5]> check.

Anyone have any ideas?

RonPK

5:07 pm on Dec 26, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're probably using IE 5.01, which is much more common than 5.0. The build numbers are not the version numbers! Every patch changes the build number, but not the version number.

I have some HTML that must be displayed for IE 5.0 and not IE 5.5. So I cannot use the <!--[if IE 5]> check.

You could also try using the less-than operator: <!--[if IE lt 5.5]>
The downside is that that comment would include the 5.1 and 5.2 series for the Mac, which may not be what you want.

DrDoc

5:39 pm on Jan 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This table may help:
[netopia.com...]

:)