W3C home > Mailing lists > Public > www-style@w3.org > February 2000

Re: Relative positioning

From: Matthew Brealey <thelawnet@yahoo.com>
Date: Fri, 04 Feb 2000 13:46:46 -0800
Message-ID: <389B48C6.372E@yahoo.com>
To: www-style@w3.org
> Relative positioning
> From: firespring (firespring@nfx.net)

> At the risk of being chastised for what might be perceived as a "how to"
> question, what I'm wondering is if there is any mechanism in CSS for
> positioning one element box relative to an absolutely positioned box
> of another element?
> I mean, with absolute positioning, elements are positioned completely
> independently as if they have no knowledge of each other, and with
> relative positioning, elements are positioned only relative to the
> normal flow. This effectively means that the two types of positioning
> can't really be used together very well, and what seems to be missing is
> a mechanism for positioning one element relative to an absolutely positioned
> (and perhaps named) element, thereby avoiding potential overlap problems.
Something like this is often useful:
CONTAINER {position: relative}
INSIDE {position: absolute}

The position: relative on the CONTAINER establishes a new containing
block for the absolutely positiond element without affecting the
CONTAINER; the reference point is the padding edge of the containing
block (not, sadly, the content edge).
> If such a mechanism existed, it would sure make it easier to create
> frame-like pages without resorting to (yecchh) tables.
If you want FRAMESET-like pages, use position: fixed; if you want
TABLE-like pages, use floats.
Received on Friday, 4 February 2000 08:45:13 UTC

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