More advanced positioning syntax

As I see it, the existing positioning syntax has a
number of deficiencies.

Firstly, and most simply, that the containing block
for absolutely positioned elements is not always what
is desired (see
). It is defined (very loosely speaking) as the
nearest non-static element, failing which it is the
root element (incidentally, when this phrase is used,
does it include BODY's margins, etc. or only HMTL's
(clearly on a literal reading it does not)).

This will not always be what is desired by the author.
Hence, a relative-to property could be introduced.

E.g., position: absolute; relative-to: -1B (a change
to the grammar of CSS, though a backwardly compatible
one is required), where the number indicates the
number of elements back - -1B = Nearest parent block.

Secondly, a true (i.e., not float) positioning scheme
that affects the position of other elements is

This seems to present two main difficulties.

Firstly, whether the page should be rendered top-down,
or whether the whole page should be read first.

The second method is the more flexible, but does
present the performance overhead.

There are essentially two options - render top-down,
or have a element-layout property - element-layout:
top-down (initial) or element-layout: read-all.

Having considered this, it is essentially trivial to
introduce the one new position value that is required
- wraparound (or wrap absolute, as suggested by Ian
Hickson). There seems to be no need for relative
wrapping positioning (because margins will do the same

It seems here that a relative-to value would be most

As to the precise implementation of the scheme, there
seems to me to be two possibilities. Firstly, you
could have the positioning 'taking bites' out of block
elements, with an effect somewhat akin to a square

Secondly, the other option is to have subsequent
elements overlapping as per float, but with inline
boxes/line boxes flowing around it.

It is clear that this positioning scheme is required,
since without it you can't do basic things like
catchlines centred between two columns.

From Matthew Brealey ( (for law)or (for CSS))
Do You Yahoo!?
Bid and sell for free at

Received on Friday, 19 November 1999 04:19:03 UTC