The default bug view has changed. See this FAQ.

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

RESOLVED INVALID

Status

()

Core
Layout: Floats
RESOLVED INVALID
14 years ago
14 years ago

People

(Reporter: Joachim Noreiko, Unassigned)

Tracking

Trunk
x86
Windows 98
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

14 years ago
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.
(Reporter)

Comment 1

14 years ago
Created attachment 128086 [details]
HTML file with embedded CSS: an example of this bug

Comment 2

14 years ago
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
Last Resolved: 14 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.
(Reporter)

Comment 5

14 years ago
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
Last Resolved: 14 years ago14 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.