Closed Bug 329220 Opened 19 years ago Closed 19 years ago

relatively positioned block expands to contain a nested float

Categories

(Core :: Layout: Positioned, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: eira, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

If a float is nested in a relatively positioned block, the block expands to contain the float. This should not happen since the float is not in flow.
Attached file Testcase
Keywords: testcase
Isn't this: http://www.w3.org/TR/CSS21/visudet.html#q22 " 10.6.6 Block-level, non-replaced elements in normal flow when 'overflow' does not compute to 'visible'; 'inline-block', non-replaced elements; and floating, non-replaced elements If 'margin-top', or 'margin-bottom' are 'auto', their used value is 0. If 'height' is 'auto', the height depends on the element's descendants." http://www.w3.org/TR/CSS21/visudet.html#root-height "In addition, if the element has any floating descendants whose bottom margin edge is below the bottom, then the height is increased to include those edges. Only floats that are children of the element itself or of descendants in the normal flow are taken into account, e.g., floats inside absolutely positioned descendants or other floats are not." So it seems to me Mozilla is following the css spec here.
Ah, Eira, you didn't tell me you had overflow:hidden on that block...
After re-reading the spec, I agree that this is invalid.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: