Closed Bug 18206 Opened 25 years ago Closed 22 years ago

[MARGIN-C]top margin on first flow child lost after out-of-flow child

Categories

(Core :: Layout, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla1.3alpha

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

(Keywords: css1, testcase, Whiteboard: [Hixie-P2][CSS1-5.5.1][patch])

Attachments

(2 files)

DESCRIPTION: When the children of the body element begin with (1) an absolutely positioned element followed by (2) a non-positioned element, then the top margin of (2) is ignored. STEPS TO REPRODUCE: * load attached test case ACTUAL RESULTS: * the red DIV saying it has a 400px top margin is at the top of the page EXPECTED RESULTS: * it should be 400px (+ a few extra) from the top. DOES NOT WORK CORRECTLY ON: * Linux, apprunner, 1999-11-04-08-M11 * Linux, viewer, 1999-11-04-08-M11 ADDITIONAL INFORMATION: The test case is similar to that in bug 16893.
Attached file testcase described in bug. (deleted) —
Assignee: troy → kipp
Would appear to be a problem with the block margin code
Updating to default Layout Assignee...kipp no longer with us :-(
Why are you re-reassing layout bugs? Do NOT touch layout bugs. The bugs are assigned to Kipp so they can stay neatly organized until we have a new owner for the block/inline code.
mass moving all Kipp's pre-beta bugs to M15. Nisheeth and I will prioritize these and selectively move high-priority bugs into M13 and M14.
Summary: margin ignored after absolutely positioned element → [FLOAT] margin ignored after absolutely positioned element
Summary: [FLOAT] margin ignored after absolutely positioned element → [FLOAT] {css1} margin ignored after absolutely positioned element
Keywords: css1
Migrating from {css1} to css1 keyword. The {css1}, {css2}, {css3} and {css-moz} radars should now be considered deprecated in favour of keywords. I am *really* sorry about the spam...
Summary: [FLOAT] {css1} margin ignored after absolutely positioned element → [FLOAT] margin ignored after absolutely positioned element
mine! mine mine mine! all mine! whoo-hoo!
Assignee: kipp → buster
moving all buster m15 bugs to m16.
Target Milestone: M15 → M16
M17, P2.
Status: NEW → ASSIGNED
Priority: P3 → P2
Target Milestone: M16 → M17
Summary: [FLOAT] margin ignored after absolutely positioned element → [BLOCK][ABSPOS] margin ignored after absolutely positioned element
win32 2000071308
Keywords: nsbeta2, nsbeta3
OS: Linux → All
Hardware: PC → All
Putting on [nsbeta2-] radar. Not critical to beta2.
Whiteboard: [nsbeta2-]
Assigning to myself to investigate.
Assignee: buster → dbaron
Status: ASSIGNED → NEW
Summary: [BLOCK][ABSPOS] margin ignored after absolutely positioned element → [MARGIN-C][ABSPOS] margin ignored after absolutely positioned element
Status: NEW → ASSIGNED
Target Milestone: M17 → M18
Have fix.
Whiteboard: [nsbeta2-] → [fix in hand][nsbeta2-]
post a patch for review?
Fix undone due to other issues...
Whiteboard: [fix in hand][nsbeta2-] → [nsbeta2-]
Giving margin collapsing bugs that I have not fixed to buster.
Assignee: dbaron → buster
Status: ASSIGNED → NEW
Target Milestone: M18 → ---
needs investigation. David, it would help if you could briefly describe what you attempted to fix this bug, and what problems you ran into. Thanks.
The code to fix it is #if 0 within the patch I attached to bug 50959. The issues are described in http://lists.w3.org/Archives/Member/w3c-css-wg/2000JulSep/0129.html .
Keywords: correctness
Attached file equivalent test case for float (deleted) —
Summary: [MARGIN-C][ABSPOS] margin ignored after absolutely positioned element → [MARGIN-C]top margin ignored on first nor-flow child when not first child
P2 bugs will not make RTM. Milestone -> Future.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
*** Bug 56233 has been marked as a duplicate of this bug. ***
From bug 56233: STEPS TO REPRODUCE http://www.webstandards.org/css/winie/box_vert.html There is a <P> with a margin-top after a float. The margin is ignored. Reflows don't help. RESULTS For that test case, there should be 40px of white at the top of the page. Currently we skip the white and go straight to silver. christine, Could you add this test case to your list of CSS tests? I'm not quite sure how we missed it, but I couldn't find it on either of our CSS test case lists... someone pointed this out to me on IRC! :-/
Keywords: testcase
QA Contact: petersen → chrisd
Summary: [MARGIN-C]top margin ignored on first nor-flow child when not first child → top margin on first flow child lost after out-of-flow child [MARGIN-V] [FLOAT]
Undoing Ian's mangling of radars. :-) It's MARGIN-C, not MARGIN-V, and this has no more to do with floats than with any other way of taking things out of the flow, such as absolute positioning. And I was wondering why I couldn't find this bug with a MARGIN-C search...
Summary: top margin on first flow child lost after out-of-flow child [MARGIN-V] [FLOAT] → [MARGIN-C]top margin on first flow child lost after out-of-flow child
*** Bug 60195 has been marked as a duplicate of this bug. ***
Note from dupe 60195: top-margin is only lost if the parent element has border:none and padding:0.
Netscape's standard compliance QA team reorganised itself once again, so taking remaining non-tables style bugs. Sorry about the spam. I tried to get this done directly at the database level, but apparently that is "not easy because of the shadow db", "plus it screws up the audit trail", so no can do...
QA Contact: chrisd → ian
*** Bug 72060 has been marked as a duplicate of this bug. ***
Whiteboard: [nsbeta2-] → [Hixie-P2]
Build reassigning Buster's bugs to Marc.
Assignee: buster → attinasi
Status: ASSIGNED → NEW
The bug does not seem to occur in quirks mode. The output of the code below differs only as long as the doctype is specified. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/strict.dtd"> <html><body> <p>test</p> </body><html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/strict.dtd"> <html><body> <div style="position: absolute; left: 0px; top: 0px;"></div> <p>test</p> </body><html>
Whiteboard: [Hixie-P2] → [Hixie-P2][CSS1-5.5.1]
This is fixed by my patch on bug 44242. It was also mentioned on c.i.w.a.stylesheets this weekend (Problem with "margin-top" in Mozilla). Taking bug, Target=1.3alpha.
Assignee: attinasi → dbaron
Depends on: 44242
Whiteboard: [Hixie-P2][CSS1-5.5.1] → [Hixie-P2][CSS1-5.5.1][patch]
Target Milestone: Future → mozilla1.3alpha
*** Bug 74557 has been marked as a duplicate of this bug. ***
Fix to bug 44242 checked in to trunk, 2002-11-28 11:29 PST.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
*** Bug 184067 has been marked as a duplicate of this bug. ***
The margin-top of div.two disappears when div.one has position fixed. Didn't test in the latest build because I don't want to. Anyone else?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: