开发者

none of my html5 styles are showing in old browsers like IE 6 and 7

开发者 https://www.devze.com 2023-03-10 09:39 出处:网络
I have made my site in html5 and added the following to the head section: <!--[if lt IE 9]> <script src=\"http://html5shiv.googlecode.com/svn/trunk/html5.js\"></script>

I have made my site in html5 and added the following to the head section:

<!--[if lt IE 9]>
 <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<scrip开发者_如何学编程t src="modernizr-1.7.min.js" type="text/javascript"></script>

for some reason when I view my site in IE 6, 7 and early versions of mozilla and safari it only displays the html and the style sheet is not being accessed (there are no styles applied). I don't know what to do, someone please help!


IE6 barely supports HTML4, never mind HTML 5 :P Seriously though. IE6 is 10 years old, it's never going to properly support HTML5. You may find a JavaScript based workaround but it'll be flakey. See http://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28HTML5%29


I wonder if the problem is your slightly complicated media attribute.

Quoting here,

Since legacy browsers (e.g., Netscape 4.x) only support screen, you can hide all CSS from them by adding a non-supported media type such as: screen, projection or simply all

Maybe IE6, 7 and the others don't have full support either and so just fail to load the CSS.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号