HTML5 shiv wont work in Internet Explorer

I am trying to create my very first HTML5 website and I am having problems trying to get it to work in IE.

I have tried modernizr and html5 shiv and I cannot get either to render my webpage properly.

Here is a link to the website

As you can see when you load the page nothing appears in Internet Explorer 8

Has anyone got any ideas as to why I cannot get my javascript to create the document elements for IE?

edit:
I just got rid of the shiv completely and added this code

<script>document.createElement("header")</script>
<script>document.createElement("nav")</script>
<script>document.createElement("article")</script>
<script>document.createElement("figure")</script>
<script>document.createElement("footer")</script>

[COLOR=“DarkOrange”]This seemed to fix this problem for all versions of IE except for IE7

Anyone know how I can tweak this to get it to work for IE7? This is the second most popular version of IE for this website and I have to support it.[/COLOR]

You haven’t added the closing script tag here:


<!--[if lt IE 9]>
<script type="text/javascript" src="http://www.users.on.net/~nova/html5/js/CreateHTML5Elements.js">[B]</script>[/B]
<![endif]-->

See if that makes a difference.

Thanks Paul, thought it would be something stupid like a typo or lack of a closing tag.

It seems the issue I was having with IE7 was more to do with a bug with IEtester, I ran a sandboxed version of IE7 and tested it in that and it ran fine.

I just checked your site again and its not working in any version of IE (apart from ie9 which isn’t getting that script rule).

I see you haven’t added the closing script tag as I mentioned which I’m sure will fix the issue (at least t did when I copied your page locally and added it in. :))

Also, you don’t need separate <script></script> tags in there - just put it all into a single one.

This word “shiv” really bothers me. Seems like a silly made-up buzzword for something that just used to be called a “workaround”, “fix” or “hack”.

Isn’t ‘shiv’ slang for a homemade knife, especially one made in prison?

Maybe they meant ‘shim’.

“…a washer or thin strip of material used to align parts, make them fit, or reduce wear.”

Then again, some people do harbour violent thoughts about IE.

^ God only knows! :lol:

Better, I would like a 5 five minute rounds in the octagon for IE!

You can use either shiv or shim. They’re identical.