HTML5 elements in IE8

Description

If you’re unlucky enough to have to support Internet Exploder 8, you’ll see that HTML5 elements, which are supposed to fall back to be basic block-level elements when not supported, don’t actually do that in IE8.

Here’s a little hack that will turn an unrecognized element into a block element:

<!--[if lt IE 9]> 
<script> 
    document.createElement('header'); 
    document.createElement('nav'); 
    document.createElement('section'); 
    document.createElement('article'); 
    document.createElement('aside'); 
    document.createElement('footer'); 
    // Any other tags you might need
</script>
<![endif]-->

<style type="text/css"> 
  header, nav, section, article, aside, footer { display:block; } 
</style>