Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

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.

Sjoerd Visscher

Tagged , ,

2 comments

  1. That is just great. Just tried it out and it works like a charm.
    Of course what black magic it's doing in the guts of IE I hate to think.

    Simon Proctor - 23rd January 2008 14:54 - #

  2. While doing some research for SitePoint's Ultimate CSS Refeence I cam across Dean Edwards solution for the unsupported abbr element in IE:
    http://dean.edwards.name/my/abbr-cadabra.html

    Basically you use a prefix in the tag name:
    <html:abbr>Abrev.</html:abbr>

    and then the following selector:
    html\:abbr

    and IE will apply the rule set to the element. It appears to inform the CSS engine in the same way as the above. It appears to work for any other element as well.

    Andrew Tetlaw - 28th January 2008 01:07 - #

Comments are closed.
A django site