html5 for IE8 or less

☆樱花仙子☆ 提交于 2019-12-01 13:21:52

Use HTML5 Shiv to add compatibility back to older browsers.

http://code.google.com/p/html5shiv/

Add this javascript to your site and it should work fine in IE 6, 7 and 8 https://github.com/aFarkas/html5shiv

IE8 and before don't recognize all HTML5 elements. You can trick the browsers into recornising them using Javascript. You can also add a default styling if you wish.

This tutorial shows you how: http://www.communitymx.com/content/article.cfm?cid=8C170

Note that Javascript is required to fix this. If Javascript is disabled, which is quite often the case with IE6 and IE7 users, you won't be able to get it to work. However, do not worry too much. IE6 is dead and IE7 and IE8 should be by now. These are old browsers.

add the below code in head section,

<meta http-equiv="X-UA-Compatible" content="IE=8" />
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js"></script>
<![endif]-->
<script src="html5shiv.js"></script>

you can download html5shiv from http://code.google.com/p/html5shiv/

kannan

Try following line in head

<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!