www.webdeveloper.com
Results 1 to 6 of 6

Thread: What does the following line mean

  1. #1
    Join Date
    Jul 2006
    Posts
    655

    What does the following line mean

    I know Internet Explorer 6 picks up the firstline below, but does it ignore the last line and any other similar lines

    <!--[if IE 6]>add IE6 stylesheet here<![endif]-->

    <!--[if IE 7]>add IE7 stylesheet here<![endif]-->

    thanks in advance

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    First line only read by IE6 (all versions)
    Second line only read by IE7 (all versions)
    http://msdn.microsoft.com/en-us/library/ms537512.aspx
    At least 98% of internet users' DNA is identical to that of chimpanzees

  3. #3
    Join Date
    Jul 2006
    Posts
    655
    Ok cool, but if i have other style sheets referenced in my page, will IE 6 read these as well or will it just read what is in the above line

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    IE6 will read all 'normal' style sheets.
    Place the conditional comments after all other style sheets and embedded styles.
    Code:
    <link rel="stylesheet" type="text/css" href="generic.css" title="generic">
    <style type="text/css" media="all">
    <!-- other style stuff -->
    </style>
    <!--[if IE 6]>add IE6 stylesheet here<![endif]-->
    <!--[if IE 7]>add IE7 stylesheet here<![endif]-->
    At least 98% of internet users' DNA is identical to that of chimpanzees

  5. #5
    Join Date
    Jul 2006
    Posts
    655
    Ok, so i need to place them after

  6. #6
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    You'll want to place them after so that they can override the above. Keeop reading that documentation from Microsoft. There is also a way to make Microsoft, and only Microsoft, ignore parts of a page. However, it will make you page a wee bit invalid.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles