How to Add HTML5 CSS3 Support for IE8 and Older Browsers

Posted by Lasantha Bandara File Under : browser, java script 0 Comment

Internet Explorer 8 and its earlier versions can not recognize the new "HTML5 elements". So we need to include the HTML5 Shim JavaScript Library to compatible these browsers with HTML5. Also IE 8 or its older versions doesn't support for "CSS3 Media Queries". You can enable CSS3 media queries support by adding the css3-mediaqueries.js Javascript library.

To add "HTML5 Shim" and "css3-mediaqueries.js" JavaScript libraries into your website or blog, add below code just before </head> tag of your template. (If you are using Blogger, go to Edit HTML first)

CSS3 and HTML5 Support for IE

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

Note: "css3-mediaqueries.js" doesn't work on @import'ed CSS files. Also will not respond to the media attribute of the <link> and <style> elements.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.