Closed Bug 213190 Opened 22 years ago Closed 22 years ago

a float widened by lots of content is pushed below an earlier narrow float

Categories

(Core :: Layout: Floats, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jnoreiko, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 See attachment. Basically, create a document with just two DIVs, both set to float:left. set the first DIV to width:100px, and fill it with text. Fill the second DIV with text too. The second DIV is displayed below the first DIV -- it should not be. Reproducible: Always Steps to Reproduce: 1. 2. 3. Actual Results: The second float is placed below the first, and has full width. Expected Results: The second float has no width specified. Therefore, it must be placed beside the first float. Its width is then determined by the available space between the first float's right hand margin and the right hand edge of the body.
This is probably invalid in some fashion because the second float has no explicit width. All floats must have an explicit width defined.
See bug 85876 for why behaving this way is a bad idea. The rules we're following should be those in http://www.w3.org/TR/2003/WD-CSS21-20030128/visudet.html#q8
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → INVALID
Comment 2's statement that all floats must have an explicit width is incorrect according to the revisions in CSS2.1.
If I'm reading http://www.w3.org/TR/2003/WD-CSS21-20030128/visudet.html#q8 correctly (If 'width' is specified as 'auto', the computed value is the "shrink-to-fit" width.), setting width:auto for the second float should make it sit to the right of the first. It doesn't.
Status: RESOLVED → UNCONFIRMED
Resolution: INVALID → ---
The shrink to fit width is defined in terms of the content and the width of the containing block, but NOT in terms of the presence of any other floats or the width of the containing block minus space taken up by other floats.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: