Posted by Harlan Messinger on 12/03/07 13:35
andrew wrote:
> I have been using the following for some time to call a small css for
> anybody still using ie5:
>
> <!--[if IE 5]>
> <link rel="stylesheet" type="text/css" href="ie5.css" />
> <![endif]-->
>
> And I have seen countless examples of this exact syntax scattered
> around the web. But I am using 4.01 strict so shouldn't I be using:
>
> <!--[if IE 5]>
> <link rel="stylesheet" type="text/css" href="ie5.css">
> <![endif]--> ^^
>
> instead? I suspect not as I have /never/ seen it done this way but I am
> curious about the reason.
Whether or not there's a trailing slash has nothing to do with the
conditional comments. If your page is XHTML, you need the trailing
slash. If it's plain HTML, it shouldn't be there, and if it is, browsers
may still handle your page but beware of lots of issues that have been
discussed here many, many times before.
[Back to original message]
|