I\'m trying to style a
and it\'s not working in IE. I\'m using Modernizr, but i\'ve tried the shiv by itself.
Example code
With IE, even with the shiv, you need to declare the HTML 5 elements as block elements. I use this line for Internet Explorer, but you can modify it for the elements you need.
header,nav,article,footer,section,aside,figure,figcaption{display:block}
From the Modernizr Documentation:
You’ll also probably want to set many of these elements to
display:block;
Sometimes custom elements (which is how we convince IE to use HTML5 tags) are inline
by default. Try adding the following piece of CSS:
section,
header {
display: block;
}
It depends on what style you're trying to impose on the element.
So as James Long put it before, custom elements are inline
by default. For IE8 you also could give the element a border by adding display: inline-block;
.