Closed Bug 87712 Opened 23 years ago Closed 17 years ago

position of abs pos element after collapsable margin incorrect [ABS POS] [MARGIN-C]

Categories

(Core :: Layout: Positioned, defect, P3)

defect

Tracking

()

RESOLVED INVALID

People

(Reporter: ian, Assigned: dbaron)

References

()

Details

(Keywords: css2, testcase, Whiteboard: [Hixie-P4])

An absolutely positioned box with 'top: auto' that comes after an element with
bottom margins ignores those bottom margins. It should (IMHO) be moved so that
it is in the same place as it would be if it had been in flow.

Test: http://www.hixie.ch/tests/adhoc/css/box/absolute/001.xml
Whiteboard: [Hixie-P4]
Summary: position of abs pos element after collapsable margin incorrect [ABS POS] [MARGIN-V] → position of abs pos element after collapsable margin incorrect [ABS POS] [MARGIN-C]
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.0
Target Milestone: mozilla1.0 → Future
Reconfirmed using FizzillaCFM/2002071208. Setting All/All.
OS: Windows 2000 → All
Hardware: PC → All
The patch in bug 44508 fixes this one too.
Keywords: patch
Target Milestone: Future → ---
Keywords: mozilla1.0
Component: Layout → Layout: R & A Pos
bug 44508 is fixed, but this seems to still be a problem...
This bug is invalid according to the CSS2.1 rules.

From CSS2.1 10.6.4:
"More precisely, the static position for 'top' is the distance from the top edge of the containing block to the top margin edge of a hypothetical box that would have been the first box of the element if its 'position' property had been 'static' and 'float' had been 'none'."

Now suppose that the red box were in-flow.  It's zero-height top margin would collapse with the margin above it, making the top margin edge the bottom border edge of the previous paragraph.

But once it's absolutely positioned, the actual margin is zero, because the margins for abs. pos. frames don't collapse with in-flow margins.  Therefore, the box is positioned directly under the previous paragraph, with no margin separating them.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → INVALID
Flags: in-testsuite?
You need to log in before you can comment on or make changes to this bug.