- From: Scott Isaacs <scotti@microsoft.com>
- Date: Thu, 30 Oct 1997 09:54:02 -0800
- To: "'Jonas Salling'" <salling@cooper.xanthus.se>, www-style@w3.org
This is possible. You need to specify position: relative on a parent
element. That defines a new coordinate system for all child elements.
<H1>Hello World</H1>
<DIV STYLE="position: relative">
<P>This is inflow.
<DIV STYLE="position: absolute; top: 10; left: 10">
This is offset 10x10 from the upper-left corner of the parent DIV that
is contained within the flow of the document
</DIV>
</DIV>
-Scott
> -----Original Message-----
> From: Jonas Salling [SMTP:salling@cooper.xanthus.se]
> Sent: Thursday, October 30, 1997 6:59 AM
> To: www-style@w3.org
> Subject: Static positioned block to define origin for abs positioned
> children?
>
> According to the CSS Positioning draft, absolutely positioned elements
> should be positioned relative to the innermost enclosing absolutely
> positioned block. It is NOT possible the have a statically positioned
> block
> define origin for its child elements.
>
> This is in my opinion a very unfortunate limitation. It makes it
> impossible
> to have a group of absolutely positioned elements (such as a short section
> of text with 2 columns layout) "embedded" in the general flow of text.
>
> To achieve these and similar effects, one is forced to make "all" elements
> absolutely positioned, which in turn makes it neccesary to move elements
> around to make room for other elements (as they grow bigger). Also, having
> all elements be absolutely positioned in this way, one is more or less
> forced to specify fixed font sizes to ensure elements won't overlap due to
> the user's stylesheet (or browser font settings).
>
> I'd suggest we introduce an additional property for block level elements:
>
> origin: parent | this
> (default value is parent)
>
> "parent" leaves it to the parent block to define origin for absolutely
> positioned child elements (the parent may in its turn leave the decision
> to
> its parent and so on) and "this" defines origin for child abs. positioned
> elements to be the upper left corner to the block having the "origin"
> property.
>
> What do you think? I don't think css positioning will be able to fully
> replace the use of tables unless this (or a similar) addition is made to
> the
> css positioning spec.
>
> If you're interested, I'll provide some example code to clarify what kind
> of
> effects I want to produce.
>
> Regards,
>
> Jonas Salling
>
Received on Thursday, 30 October 1997 17:31:46 UTC