HTML 5 Boilerplate - Issues with IE?
I usually code all website projects by scratch but I decided to use boilerplate for a new project after checking out the source code etc...
The set-up is great and the code is solid but I am having problems with IE that I may just be overlooking but I can't seem to solve the issue. Basically, the site displays perfect on every browser and phones etc but will not display anything for IE... The only thing that IE displays is the body background??
Basically because I can't post the website because of the client (they are quite high profile where I am from) I am just checking if this is a common problem?? Is there a quick fix??
I know I'm not giving much information I'm just looking to see if this is a common fix or if it's something I'll have to look into...
Thanks for any help!
EDIT - Here is my doc hea开发者_高级运维d:
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" href="css/style.css">
<script src="js/libs/modernizr-2.0.min.js"></script>
<script src="js/libs/respond.min.js"></script>
<script type="text/javascript" src="http://use.typekit.com/lyx5qmg.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
</head>
On google's site at: (dead link) https://code.google.com/p/html5shiv/issues/detail?id=24# it says the problem is with the url. A gentleman named Richard Bland indicated a correction:
!--[if lt IE 9]> <script src=**"http://**html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
Please note, I am quoting the gentleman from that website.
I had the same problem. I solved it by downloading and referencing an updated version of Modernizr here http://www.modernizr.com/ - I guess 2.0 just doesn't cut it anymore :)
If you're using IE8 or earlier, you'll need to use HTML5 Shiv to make IE understand the new HTML5 tags. Simply add this code to your <head>
and it should work:
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
First of all, with HTML5 you don't need the type
attribute on the script
element.
Secondly, close your link stylesheet
element. IE is a lot less tolerant of such things so chances are this is causing it to not see the stylesheet at all.
精彩评论