When you start building your website using HTML5 markup you will be surprised at the amount of issues you experience, especially with older versions of Internet Explorer.
Older versions of Internet Explorer (IE 6,7 or 8) don’t have the support needed for the new HTML5 structural elements such as: header, footer, section, aside, article, etc .
These browsers don’t understand those elements so when they render a page that is built in HTML5 they will omit them, thus-creating layout and styling issues.
How to use it:
- Go to http://code.google.com/p/html5shiv/
to find the latest release
- Include the following script before <body> in the <head> tag like this:
<!--[if lt IE 9]>
Issues when appending content
Keep in mind that your page can break if you append content using innerHTML like this:
var x = document.createElement("div");
x.innerHTML = "<section>content here</section>";
You can fix this with jQuery using a second parameter as false in this function:
$("div").append(innerShiv("<section>content here</section>", false));