Click to See Complete Forum and Search --> : What does the following line mean


oo7ml
01-21-2009, 08:16 AM
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

Fang
01-21-2009, 08:21 AM
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

oo7ml
01-21-2009, 09:27 AM
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

Fang
01-21-2009, 10:12 AM
IE6 will read all 'normal' style sheets.
Place the conditional comments after all other style sheets and embedded styles.
<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]-->

oo7ml
01-21-2009, 10:19 AM
Ok, so i need to place them after

Charles
01-21-2009, 11:11 AM
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.