W3C home > Mailing lists > Public > www-style@w3.org > August 2004

Relative absolute position in blocks

From: Fredrik Söderberg <mcdrill@acc.umu.se>
Date: Sun, 29 Aug 2004 18:13:55 +0200 (MEST)
To: www-style@w3.org
Message-ID: <Pine.GSO.4.61.0408291802090.18687@shaka.acc.umu.se>

I hope this hasn't already been discussed or I am really stupid,
but I couldn't find anything regarding this issue after a quick
search through the archives.

I am looking for a way to set absolute position, but relative
to the box it is in.

For example, if I have a box <div> and inside that box I have
another <div>. Now what would be wonderful would be if the inner
<div> position could be set so left: 10px; would generate this
box 10px left of the box border it is currently in. And if I
now take this inner <div> and move it to somewhere else, it will
always have the position 10px to the right of the left border of
whatever box it is in.

I was at first hoping position: relative would do this, but it
ofcourse did not. As far as I can see there is no way to achive
what I want in current CSS. Or?

If not, wouldn't this be a very excellent feature? It would be
much easier to modulize the layout.

Even if I haven't found any info on this, I kind of expect an
answer that says it has already been discussed etc, since to me
it sounds like it should already be possible. Even so, will be
glad to get any response :)

Received on Sunday, 29 August 2004 16:14:52 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:13:07 UTC