Reputation: 10541
I'm referencing some external scripts for =< IE8 like this:
<!--[if lte IE8]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
However, looking at my site in =< IE8, the files are referenced successfully, but I can literally the text: <!--[if lte IE8]><![endif]-->
in the page, just above the body!
Is this a common error? The code is the last thing in my <head></head>
.
It's a Ruby on Rails app and I'm using Bootstrap 3...
Upvotes: 0
Views: 81
Reputation:
Try changing this:
<!--[if lte IE8]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
To this:
<!--[if lte IE 8]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
It's because there is no space between IE
and 8
. Remember to always put a space there in between.
See here: http://msdn.microsoft.com/en-us/library/ms537512%28VS.85%29.aspx
Upvotes: 1
Reputation: 3435
Try putting a space between IE and 8, likewise: <!--[if lte IE 8]><![endif]-->
Upvotes: 0
Reputation: 5633
You need a space between 'IE' and the version number, it might be the cause.
Upvotes: 0