Last Comment Bug 213190 - a float widened by lots of content is pushed below an earlier narrow float
: a float widened by lots of content is pushed below an earlier narrow float
Status: RESOLVED INVALID
:
Product: Core
Classification: Components
Component: Layout: Floats (show other bugs)
: Trunk
: x86 Windows 98
: -- normal (vote)
: ---
Assigned To: layout.floats
: Hixie (not reading bugmail)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-19 16:37 PDT by Joachim Noreiko
Modified: 2003-07-20 14:15 PDT (History)
0 users
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
HTML file with embedded CSS: an example of this bug (2.63 KB, text/html)
2003-07-19 16:39 PDT, Joachim Noreiko
no flags Details

Description Joachim Noreiko 2003-07-19 16:37:48 PDT
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.
Comment 1 Joachim Noreiko 2003-07-19 16:39:31 PDT
Created attachment 128086 [details]
HTML file with embedded CSS: an example of this bug
Comment 2 Bill Mason 2003-07-19 17:14:52 PDT
This is probably invalid in some fashion because the second float has no
explicit width.  All floats must have an explicit width defined.
Comment 3 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2003-07-19 17:16:48 PDT
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
Comment 4 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2003-07-19 17:18:16 PDT
Comment 2's statement that all floats must have an explicit width is incorrect
according to the revisions in CSS2.1.
Comment 5 Joachim Noreiko 2003-07-20 01:55:06 PDT
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.
Comment 6 David Baron :dbaron: ⌚️UTC-7 (busy September 14-25) 2003-07-20 14:15:16 PDT
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.

Note You need to log in before you can comment on or make changes to this bug.