Html5shiv not working

1.6k Views Asked by At

I´ve a problem with the html5shiv script. It´s not working in ie8>-

Preview here: This Script is in Use:

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

already tested:

<script type="text/javascript">
    document.createElement('header')
    document.createElement('footer')
    document.createElement('main')
    document.createElement('section')
    document.createElement('nav')
</script>

Load the script in the HEAD - AFTER and BEFORE the styles.

All html5 elements have this standard styles: (load after both scripts)

article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
audio:not([controls]) { display: none; }
[hidden] { display: none; } 

Unfortunately not found any suitable solution on google, stackoverflow and the html5shiv documentation site. Tried all Tipps/Tricks from the answers here. But it´s still not working.

2

There are 2 best solutions below

0
designerNProgrammer On

Try using Shivs on bottom or change the location. Sometimes they just conflict with Js.!

0
DoomageAplentty On

Is your stylesheet loading from the current domain, not an off-site CDN or anything like that? If the stylesheet is hosted elsewhere, host it locally on your domain and see if that helps.