Results 1 to 7 of 7

Thread: detect ie6

  1. #1
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default detect ie6

    what is the best way to detect ie6. then once you detect it can you have different instructions in the <body> of the document?

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    By instructions do you mean for style or the actual content?

    http://www.quirksmode.org/css/condcom.html

  3. #3
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default

    actual content, ie6 does not support transparent png, so i would like a different layout for that vs other browsers

  4. #4
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    You can use conditional comments:
    Code:
    <!--[if IE 6]>
    IE6-lines
    <![endif]-->
    
    <!--[if !IE]><!-->
    Lines for non-IE
    <!--<![endif]-->
    
    <!--[if gt IE 6]><!-->
    Lines for IE>6 and non-IE
    <!--<![endif]-->
    Arie Molendijk
    Last edited by molendijk; 06-03-2009 at 12:08 PM. Reason: Correction

  5. #5
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

  6. #6
    Join Date
    Jan 2008
    Posts
    441
    Thanks
    67
    Thanked 4 Times in 4 Posts

    Default

    thank you, the fix from: http://homepage.ntlworld.com/bobosola/pnghowto.htm
    HTML Code:
    <!--[if lt IE 7]>
    <script defer type="text/javascript" src="pngfix.js"></script>
    <![endif]-->
    should this say ie6 <!--[if lt IE 7]>

  7. #7
    Join Date
    Apr 2008
    Location
    So.Cal
    Posts
    3,643
    Thanks
    63
    Thanked 516 Times in 502 Posts
    Blog Entries
    5

    Default

    Quote Originally Posted by ggalan View Post
    should this say ie6 <!--[if lt IE 7]>
    "lt" means "less than", so "lt IE7" means IE6 or earlier. However, I've usually seen it written like so:
    Code:
    <!--[if lte IE6]-->
    meaning "less than or equal to IE 6". Don't know if it would make a difference.

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
  •