[Webkit-unassigned] [Bug 14938] absolute positioned DIV w/ single float:right child is sized to its children. bug?
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 18 20:22:54 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=14938
Gérard Talbot <browserbugs at gtalbot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |browserbugs at gtalbot.org
--- Comment #3 from Gérard Talbot <browserbugs at gtalbot.org> 2010-06-18 20:22:54 PST ---
> absolute positioned DIV
#outer {
position: absolute;
top: 10px;
right: 10px;
}
[quote]
'left' and 'width' are 'auto' and 'right' is not 'auto', then the width is shrink-to-fit. Then solve for 'left'
[/quote]
Coming from
CSS 2.1, section 10.3 Calculating widths and margins, 10.3.7 Absolutely positioned, non-replaced elements
http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width
> w/ single float:right child
#outer ul {
list-style: none;
float: right;
}
[quote]
If 'width' is computed as 'auto', [then] the used value is the "shrink-to-fit" width.
[/quote]
CSS 2.1, section 10.3.5 Floating, non-replaced elements
http://www.w3.org/TR/CSS21/visudet.html#float-width
So, both parent container and unique child are sized according to shrink-to-fit width calculation.
#inner {
position: absolute;
right: 10px;
bottom: -100px;
}
Same thing here because 'left' and 'width' are 'auto' and 'right' is not 'auto': shrink-to-fit width calculation. That's why the text in the #inner <LI> element is broken into multiple lines.
FWIW, when I view the provided testcase with Firefox 3.6.3 build 20100423, Opera 10.10, Konqueror 4.4.4 and Google Chrome 6.0.437.1 dev, I get the same rendering.
regards, Gérard Talbot
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list