W3C home > Mailing lists > Public > www-style@w3.org > May 2013

[css4-text? css4-box?] Absolutely positioned child elt, ignore width of parent elt for linebreaking

From: Zack Weinberg <zackw@panix.com>
Date: Wed, 1 May 2013 11:25:19 -0400
Message-ID: <CAKCAbMjXURFCxf_Nq2WzkhLHZjxMdKskkdU-fTXcOWpDy5y4Vg@mail.gmail.com>
To: www-style list <www-style@w3.org>
In the attached test case, the three outlined boxes are laid out at their
narrowest possible width without breaking words, because despite being
position:absolute (which takes them out of flow) and width:auto, they are
*structurally* inside containers with fixed, narrow widths.  If you comment
out width:30px in the first style declaration, they are instead laid out at
their widest possible width given the max-width setting and the measure of
the text.

As far as I can tell, there is no way to get the "widest possible" behavior
with this HTML structure and a fixed-width parent element.  It would be
nice if there were such a way; this structure may be necessary for other
reasons (I tripped over this while trying to put <details> elements in a
table).

Received on Wednesday, 1 May 2013 15:25:41 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:27 UTC