Reputation: 357
I'm building a website and need IE 8 support. I'm using HTML5 semantic elements (main, section, article, nav, header and footer).
I know these should NOT work in IE 8 so I included html5shiv.
And styled all elements as display: block;
.
My layout was still a mess in IE 8 … so I added classes to all semantic elements and used those classes to style the elements in CSS.
Now the layout is correct AND I no longer seem to need the html5shiv.
Is this even possible? Can you style the semantic elements using classes without the use of html5shiv? If so, why use html5shiv?
nav {color: red}
does not work, but
<nav class="nav">
.nav {color: red}
does seem to work without html5shiv. Can someone confirm this?
EDIT: After some careful testing I found out the following:
When having a SVG element on the page (which will not render in IE 8) the semantic elements can be styled with classes without the use of html5shiv. This is very weird and probably some kind of bug in IE 8.
Upvotes: 1
Views: 282