HTML and CSS Reference
In-Depth Information
This ensures that all browsers should basically do what you want with your
CSS—well, except for IE. IE versions 6-8 need more help, because they won't style
unknown elements at all! For IE versions 6-8 to recognize unknown elements,
you need to create an instance of each unknown element in the DOM. Something
like this will do:
// add more elements as required
Notice that here you're not only dealing with block-level HTML5 elements, but
are also dealing with inline HTML5 elements like <mark> and HTML 4 elements
that simply aren't supported in older versions of IE, such as <abbr> .
If you need to add a lot of these elements, there is a better way to deal with your
script. Replace the preceding script block with the following:
<!--[if lt IE 9]>
t >
This applies the “HTML5 shiv” to your code, which is a script written by the
diminutively statured but huge-hearted Remy Sharp and hosted at Google Code.
It does the work of all the JavaScript described earlier, and more. Because it is
hosted at Google Code, you just have to link to it: You don't need to understand
the contents or worry about hosting it yourself and upgrading to the latest version
when it is updated.
Search WWH ::

Custom Search