Re: canvas <html> <body>

Sigurd Lerstad wrote:
> I'm confused,
> 
> How can a stylesheet determine which is the root, html or body ?

By uisng the :root pseudo-class.

    html:root { }

...will only match <html> elements that are the root element, and

    body:root { }

...will only match <body> elements that are the root element.

(This uses CSS3's new selectors.)

-- 
Ian Hickson
``The inability of a user agent to implement part of this specification due to
the limitations of a particular device (e.g., non interactive user agents will
probably not implement dynamic pseudo-classes because they make no sense
without interactivity) does not imply non-conformance.'' -- Selectors, Sec13

Received on Wednesday, 1 May 2002 07:09:46 UTC