SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member jeffreyblove's Avatar
    Join Date
    Nov 2004
    Location
    maple ridge
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy IE conditional 'lt' operator makes statement display!

    Hi All
    Just jumping on the bandwagon and trying to implement a simple conditional statement strategy. What I cannot fix is that if I try to use the following simple statement in my header,
    <!--[if IE lt 7]>
    <link rel="stylesheet" ... >
    <![endif]-->
    the css is applied as expected, but I get <!--[if IE lt 7]> <![endif]--> displayed at the top of my HTML page.
    If I use <!--[if IE 6]>, css is applied as expected and I see no code in the display.

    I'm testing in IE 6.0.28.

    Has anyone seen this?

    Cheers, JeffL

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,169
    Mentioned
    190 Post(s)
    Tagged
    2 Thread(s)

    conditional comments

    It seems IE doesn't like that syntax. Try this instead
    HTML Code:
    <!--[if lt IE 7]>
    <link rel="stylesheet" ... >
    <![endif]-->
    A little confusing considering that the MS page on conditional comments shows this syntax as an example
    Therefore, the conditional expression [if IE lte 5.0000] returns false .....
    So why am I NOT surprised?

  3. #3
    SitePoint Member jeffreyblove's Avatar
    Join Date
    Nov 2004
    Location
    maple ridge
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Many thanks 'Jack'- I was indeed baffled and (ebarassingly) trusted the MS site samples.

    - JeffL


Bookmarks

Posting Permissions

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