This is what is happening when you visit my site in IE9 -
This is the code that is causing this:
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<link rel="stylesheet" href="stylesheets/ie.css" media="screen" />
<![endif]-->
<!--[if !IE]-->
<link rel="stylesheet" href="stylesheets/sizeable.css" media="screen" />
<!--[endif]-->
<!--[if !IE]-->
<link rel="stylesheet" href="stylesheets/sizeable.css" media="screen" />
<!--[endif]-->
Thoughts?
Actually, the "dashes" are correct, but first you must close the conditionals, like so:
Not adding the "dashes" will cause no browser to pay attention to these conditionals. Non-IE browsers do not read comments, so the code must be outside the comment for the
!IE
condition.EDIT: fixed according to the commenters, thanks. See also the other answers.
Corrected code (second part):
You're closing your comments prematurely. Your conditional comments should open like:
and end like:
You did the first one right, but because your opening tags end with
-->
, that closes the comment right there, so the link tag, which is supposed to be part of the comment, isn't, and is interpreted as regular HTML.Hope that helps!
Above conditional comment will work properly For Hiding Comment line you must have to add
<!--<!
in this format