Conditional comments
I was just reading on Quirksmode.org about conditional comments. If you don’t already know about this small bit of functionality read on.
Internet Explorer “has been programmed to recognize the special <!--[if IE]> syntax, resolves the if and parses the content of the conditional comment as if it were normal page content.” Since it is enclosed within the same structure as an HTML comment (<!-- -->) all other browsers will see them as normal comments and will ignore them entirely.
<!--[if IE 6]>
Special instructions for IE 6 here
<![endif]-->
What piqued my interest in the first place was this portion of the Adobe Edge newsletter:
<noscript>
<!--[if lt IE 7]><link href="/css/master_import/noscript_ie6.css" type="text/css" rel="stylesheet" /><![endif]-->
<!--[if IE 7]><link href="/css/master_import/noscript_ie7.css" type="text/css" rel="stylesheet" /><![endif]-->
</noscript>
Seems like it might be very useful!
0 Comments:
Posta un commento
<< Home