small medium large xlarge

Back to: All Forums  HTML5 and CSS3
24 Feb 2011, 16:13
Kali (3 posts)

the most confusing thing to me about HTML5 is the “falling back” issue – coding for browsers that don’t support HTML5.. regarding code like this:

document.createElement(“nav”); document.createElement(“header”); // etc…

if IE doesn’t support elements such as “nav” and “header”, what is the point of creating them dynamically? I don’t suppose IE will support these HTML5 elements because we create them dynamically???

there are things, like HTML5 shiv ( that this guy mentions here (under no. 2..) plus he uses a IE8.js (lots of minified code that I have no idea what it does), so this issue is a confusing one to me… if I remember well (which I might not…;-), I think you mention shiv in yr book at some point, but can’t find where anymore (it’s not in the index)

can you please clarify this issue a bit more, if it’s not too much trouble.. thank you..

27 Feb 2011, 01:26
Brian P. Hogan (176 posts)

At the end of the HTML5 chapter I mention the same shiv. It does exactly the same thing - it declares the elements using JavaScript - it just does it more dynamic. The idea though is exactly the same, and I make you do it manually first so you understand what’s going on.

It turns out that just defining them in JS does let you style them with CSS in IE6,7, and 8. It’s a bit of an exploit. But try it out. The point is that this lets you use the semantic markup that’s coming without waiting, without being held back.

Does that help a bit?

01 Mar 2011, 17:04
Kali (3 posts)

thank you Brian.. at the end of WHICH chapter do you mention shiv??

thank you very much for your response…

04 Mar 2011, 03:35
Brian P. Hogan (176 posts)

My goodness, I’m sorry for that unclear reference! I meant “at the end of the “New structural markup” tip.

Glad to help!

Prof pic_pragsmall
21 Nov 2011, 12:27
John Ashmit (1 post)

thanx buddy for sharing your view..actually i am also facing the same problem ..thanx again brian

22 Apr 2014, 20:50
Imad Eddine (1 post)

Thank You Kali ! I’m blogger from Morocco ^_^

You must be logged in to comment