BizTalk Utilities CV ,   Jobs ,   Code library
Go to the front page to continue learning about XML or select below:


ReBlogger Contents

Previous posts in XSL/T

Page 7110 of 21350

Getting HTML 5 styles in IE 7+

Blogger : Ajaxian Blog
All posts : All posts by Ajaxian Blog
Category : XSL/T
Blogged date : 2008 Jan 24

Btw, if you want CSS rules to apply to unknown elements in IE, you just have to do document.createElement(elementName). This somehow lets the CSS engine know that elements with that name exist.

This was uttered by Sjoerd Visscher innocently on a Sam Ruby thread, and it sent ripples of "huh? really? How come I never know that!" through all of the experts.

This fact means that you the following will show up as red in IE 7:

This is an example from John Resig as he discusses a HTML 5 shiv. You can see how a JavaScript shim can "implement" some of HTML 5 for us.

We have also gone down this route for some of the HTML 5 spec, and you can indeed do a lot with JavaScript. There are a couple of places where you kinda have to be in the browser to do the right thing.... but these are few and far between.

Sjoerd Visscher just blogged about this and told us how he found it out (back in 2002-ish!):

As far as I can remember we found out about this when we converted the first rendering of the XSL output from a lot of createElement calls to one innerHTML change for performance. This caused our custom elements to no longer be affected by CSS.

Read comments or post a reply to : Getting HTML 5 styles in IE 7+
Page 7110 of 21350

Newest posts

    Email TopXML