SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    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?

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    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!
    I haven't been able to check the code works as I have the multiple versions of ie installed on the same computer and they all seem to identify themselves as ie6.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts