W3C home > Mailing lists > Public > www-style@w3.org > March 1999

positioning the root element

From: Ian Hickson <py8ieh@bath.ac.uk>
Date: Fri, 19 Mar 1999 20:45:05 +0000 (BST)
To: www-style <www-style@w3.org>
Message-ID: <Pine.GSO.4.04.9903192037170.29262-100000@mary.bath.ac.uk>

According to CSS2, section 9.1.2,

# The initial containing block cannot be positioned or floated (i.e.,
# user agents ignore the 'position' and 'float' properties for the
# root element).

This is silly. 

Since the root element has a containing block of its own, chosen by
the UA (probably the viewport or page), why can the root element not
be positioned? There are no ambiguities, and implementing such
behaviour is not impossible (NGLayout currently implements position on
the root element).

For example, in an html document, how would one get the BODY to render
within a frame, if one could not position the HTML element?

If you could, it would simply be:

   HTML { position: fixed; left: 0; top: 0; right: 0; width: 0; 
          overflow: scroll; }

...with the appropriate borders, and so on.

Currently, one has to do this on BODY, and insert a DIV around the
content, which is clearly not a satisfactory solution.

I suggest that the rule quoted above be simply removed from the spec.

Ian Hickson 
U+2642 U+2651
U+262E U+2603 U+263A
Received on Friday, 19 March 1999 15:45:13 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:49 UTC