Results 1 to 2 of 2
Dec 25, 2003, 23:54 #1
- Join Date
- Nov 2003
- 0 Post(s)
- 0 Thread(s)
IE conditional comments not quite working
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?
Dec 28, 2003, 16:22 #2
- Join Date
- Jan 2003
- Hampshire UK
- 183 Post(s)
- 6 Thread(s)
Have a look here:
I haven't been able to test it but you should be able to use "lt" which stands for less than. The code as follows should only apply to versions less than 5.5.
<!--[if lt IE 5.5000]> You are using less than IE 5.5! <![endif]-->