RE: shrink-wrap

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 UTC