Re: New elements vs. Trident

Robert Burns wrote:
>> For XHTML you can mark up new elements like this:
>>
>> <html:newelement><em>some text</em></html:newelement>
> 
> Is that for IE? Or does that work in any browser (specifically Firefox)?
> 

It will work cross-browser if it is marked up as above.

To style the new element you have to use namespace aware CSS. 
Annoyingly, IE requires the namespace delimiter to be escaped:

html\:newelement {
  /* some style */
}

Cross-browser styling looks like this:

html\:newelement, newelement {
  /* some style */
}

-dean

Received on Monday, 17 September 2007 00:17:13 UTC