Closed Bug 82852 Opened 24 years ago Closed 22 years ago

[FLOAT]Wrong height for Rel Pos OR floated block containing Float

Categories

(Core :: Layout, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 180711
mozilla1.2alpha

People

(Reporter: val, Assigned: attinasi)

References

Details

(Keywords: css2, testcase)

Attachments

(3 files)

From Bugzilla Helper: User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk (Win98; I) BuildID: 2001050515 In computing heights and margins of block-level, non-replaced elements in normal flow, http://www.w3.org/TR/REC-CSS2/visudet.html#q17 says: "Only children in the normal flow are taken into account (i.e., floating boxes and absolutely positioned boxes are ignored, and relatively positioned boxes are considered without their offset)." Reproducible: Always Steps to Reproduce: The attached testcase shows that the height of the float is wrongly being included in the computation of the height of the Rel Pos containing block.
Chnaging QA Contact
QA Contact: petersen → ian
Marking NEW. I see this in the 0.9.2 release.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Windows 98 → All
Reassigning to attinasi.
Assignee: karnaze → attinasi
Still a problem with 11/02/2001 CVS build on WINNT. Adding [FLOAT] to status.
Whiteboard: [FLOAT]
Target Milestone: --- → mozilla1.2
Moved FLOAT to Summary
Summary: Wrong height for Rel Pos block containing Float → [FLOAT]Wrong height for Rel Pos block containing Float
Whiteboard: [FLOAT]
I stumbled across this bug and discovered it's not restricted to relatively positioned elements, but also those than have been floated-- so I've updated the summary accordingly. I'll also attach a testcase demonstrating the problem.
Summary: [FLOAT]Wrong height for Rel Pos block containing Float → [FLOAT]Wrong height for Rel Pos of floated block containing Float
It turns out that if you float or relatively position an element that contains floats, the "outer" element will wrap around the floats. This should not happen.
Correcting misleading typo in summary change. Apologies for the spam.
Summary: [FLOAT]Wrong height for Rel Pos of floated block containing Float → [FLOAT]Wrong height for Rel Pos OR floated block containing Float
Thanks to input from a student in one of my CSS classes, I've come up with another testcase (well, a small set of them) showing weirdness with floated eimages inside relatively-positioned block-level elements, and how the float basicalyl gets ignored for later flow. Even worse, adding borders to elements can throw off the layout from one wrong state to another. Ick. I also have a case of a relatively-positioned elemennt expanding itself to wrap around a tall float, even though there's no apparent reason why it should. CC:ing my favorite CC: buddy, dbaron. Testcase to follow shortly.
Keywords: css2
*** Bug 177685 has been marked as a duplicate of this bug. ***
Fixed by bug 180711 *** This bug has been marked as a duplicate of 180711 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: