Closed
Bug 170927
Opened 22 years ago
Closed 20 years ago
shrink-wrap of absolutely positioned elts. ignoring abs. pos. descendants
Categories
(Core :: Layout: Positioned, defect, P1)
Core
Layout: Positioned
Tracking
()
RESOLVED
FIXED
mozilla1.2beta
People
(Reporter: dleborgne, Assigned: MatsPalmgren_bugz)
References
Details
(Keywords: css2, testcase, Whiteboard: [CSSWG])
Attachments
(1 file)
403 bytes,
text/html
|
Details |
<html> The following code displays strangely in Mozilla 1.0.1 (20020826). The text is displayed fine but the box itself (border and background-color) is smaller than the contained text. <head> <style type="text/css"> .popup {border:1px; border-style:solid; padding:1px; font-family: Arial, Helvetica, sans-serif; font-size:8pt; position: absolute; background-color: #FFFFE1; layer-background-color: #FFFFE1;} </style> </head> <body> <div id="tooltip" style="position:absolute"><DIV CLASS=popup>Modifier</DIV></div> </body> </html>
Comment 1•22 years ago
|
||
I set a border on the outer 'div' to show what's going on here more clearly, and got rid of the extraneous bits of non-CSS.
Comment 2•22 years ago
|
||
This would appear to be an effect of the shrink-wrapping algorithms, which collapse the width of the container and the "popup" to zero. The content of the popup spills out of the element box, which is permitted, but the question becomes: is this really what the shrink-wrapping algorithms should do? It's not exactly intuititve.
URL: http://localhost/
How do other browsers display the testcase? The rules in CSS 2.1 need to be clarified. (I may even have an action item from the last F2F to do that, although I think that's for CSS3.) I think that 10.3.7 and 10.6.4 should explicitly say that they want the standard shrink-wrap width, including floats (as table cells do, since they establish a new block formatting context (or "flow")) and including absolutely positioned elements (unlike table cells, assuming that's what other implementations do).
URL: http://localhost/
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 2000 → All
Priority: -- → P1
Hardware: PC → All
Summary: background-color not displayed in nested DIVs → shrink-wrap of absolutely positioned elts. ignoring abs. pos. descendants
Whiteboard: [CSSWG]
URL: http://localhost/
Component: Style System → Layout
Keywords: css2
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2beta
Comment 4•22 years ago
|
||
IE5.5 collapses the size of the outermost DIV to zero, but the 'popup' DIV expands to wrap the content as the author expected.
Oh. Now I see. We're probably using the containing block width for the absolutely positioned element shrink-wrapping when we shouldn't be. And that also suggests that a change to the spec wouldn't be needed. I might want to write some additional testcases though, to test WinIE/MacIE/Nav4.x more closely, though.
Component: Layout → Layout: R & A Pos
Comment 7•21 years ago
|
||
*** Bug 112491 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 8•21 years ago
|
||
*** Bug 209306 has been marked as a duplicate of this bug. ***
Comment 9•21 years ago
|
||
Is this also blocking bug 157681 ? (resp is bug 201897 a dupe of this)
Assignee | ||
Updated•20 years ago
|
Assignee: dbaron → mats.palmgren
Status: ASSIGNED → NEW
Assignee | ||
Comment 10•20 years ago
|
||
-> FIXED (by bug 201897)
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•