Closed
Bug 268454
Opened 20 years ago
Closed 20 years ago
float:left declaration breaks when no width specified for a div
Categories
(Core :: Layout: Floats, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: lupufr, Unassigned)
Details
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 Bonjour, In attached test case, text must not go under the left image when greater than 2 lines. Reproducible: Always Steps to Reproduce: - Have an image set to float:left. - Have a div with arbitrary text inside and set to float:left. No width is specified. - Both are encapsulated into a div with a fixed width. Actual Results: When text goes on 2 lines, its encapsulating div seems to inherit its parent container width and goes under the image. Expected Results: Text must go straight when its height is greater than its companion image. Comment : - works fine in IE (see screen captures). - workaround : declare display:table-cell for the text div. Thank you for your help :-) - Ben
| Reporter | ||
Comment 1•20 years ago
|
||
| Reporter | ||
Comment 2•20 years ago
|
||
| Reporter | ||
Comment 3•20 years ago
|
||
Comment 4•20 years ago
|
||
CSS says that the remaining room must be ignored when determining float width. If you change the window with in IE and then view this test: http://www.hixie.ch/tests/adhoc/css/box/float/008.html ...you'll see why.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 5•20 years ago
|
||
Ok. Thank you. Anyway from a design perspective, it's annoying as I have to switch back to a micro-table to be able to achieve the purposed effect.
Comment 6•20 years ago
|
||
Well, tables weren't intended for this kind of layout. In CSS2 the correct way to get that kind of layout would be with 'display:table' and friends. Unfortunately IE doesn't support that.
You need to log in
before you can comment on or make changes to this bug.
Description
•