IntroductionIE doesn't apply CSS to elements which it doesn't know about. Detailsdocument.createElement("nav");After this JS line is executed, IE applies CSS to <nav> </nav> element. Note: I don't know if this element shows up in the DOM. External links Comment by Sjoerd Visscher describing this trick
|
That element would not be in the DOM. You would have to add it as a child to an existing element first.
As far as I know that actual element would cease to exist when the code block exits.
Also note that nested custom elements won't work correctly using this technique. In order to support nested custom elements you have to delve into using Microsoft Behaviors.