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

RE: shrink-wrap

From: Joe Hewitt <joe@joehewitt.com>
Date: Wed, 5 Apr 2000 15:39:39 -0400
To: <www-style@w3.org>
Message-ID: <000001bf9f36$af48d6e0$31cfb326@zenimax.com>
Jan,

I have read over the box model part of the spec many times, and I am fully
aware of the difference between block and inline.  Perhaps I should have
clarified that the lack of an ability to "shrink-wrap" is a problem only on
elements with "position: absolute".

Because absolutely positioned elements are always treated as block-level, it
is impossible, even if you specify "display: inline", to cause these
elements to behave as inline elements.  This is a real problem for anyone
that has a reason to use absolute positioning.

Here is a very common application that would require this behavior.  Imagine
a web page that wanted to create a tool-tip like behavior.  When the user
mouses over an element, a little box pops up with a caption describing the
element.  Obviously, the designer would not know the exact dimensions of
this box at design-time; it would be dependent on the size of the caption
text.  Currently, it is impossible to achieve the desired effect within the
constraints of the CSS2 box model.  If the designer set width and height to
"auto", the tool-tip's dimensions would extend to the edges of  the
containing block, which is obviously not going to result in the desired
dimensions.

Any thoughts?

- Joe
Received on Wednesday, 5 April 2000 15:35:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:04 GMT