Closed Bug 236869 Opened 20 years ago Closed 20 years ago

Edge of list item box does not stretch underneath adjacent float


(Core :: Layout: Floats, defect)

Windows 2000
Not set





(Reporter: Michael_Landis, Unassigned)




(Whiteboard: [invalid based on notion of implementing a css3 property])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113

In test case the list item
boxes (bordered in blue) should stretch underneath the floated div (bordered in
green), according to and . Unfortunately, they don't -- the
LIs' boxes are pushed away from the float. CSS2.1 notes that this should happen
if the elements in normal flow create a new block formatting context, but for
elements that do not (as the LI's do not) the blocks should flow underneath the
floats. CSS is clear that items displayed as list-item generate principal block
boxes that participate in the block formatting context. Whether the contents are
inline boxes (per CSS 2.1) or block boxes (CSS 2) the border/padding applied to
the LI should be applied to the principal box, not the child boxes. 

Reproducible: Always
Steps to Reproduce:
Create a floated element before a static list. The outer list container (created
by the UL/OL) will flow underneath the float, while the LI's will not.
Actual Results:  
The LI box stops at the edge of the float box.

Expected Results:  
The LI box should flow underneath the float box.
Whiteboard: [invalid based on notion of implementing a css3 property]

*** This bug has been marked as a duplicate of 163110 ***
Closed: 20 years ago
Resolution: --- → DUPLICATE
I disagree that this bug is a duplicate of 163110, because that bug is really 
just successive float hooking, while this one is a clear refusal of a list item 
to stretch full width in the container while a float is at the same level.

This is precisely the behavior exhibited by a table next to a float, even to 
being identical when the list item is given "width: 100%", where a scrollbar is 
created because the float forces the li out of the container.

Even giving the li "display: block;" does nothing to change the behavior.
It would be nice if there was some way to change this back to a real bug,
rather than a duplicate of an unrelated non-bug.
You need to log in before you can comment on or make changes to this bug.