Bug 90251 - Shrinkwrapped box containing a [display:block] + [float:left] + [float:left;clear:left] expands parent box to the right
: Shrinkwrapped box containing a [display:block] + [float:left] + [float:left;c...
Status: UNCONFIRMED
: WebKit
CSS
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Minor
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-06-29 00:11 PST by
Modified: 2012-06-29 03:48 PST (History)


Attachments
single html showing the bug (1.85 KB, text/html)
2012-06-29 00:11 PST, biziclop
no flags Details


Note

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


Description From 2012-06-29 00:11:03 PST
Created an attachment (id=150095) [details]
single html showing the bug

( source of the bug: http://stackoverflow.com/questions/11249286/chrome-bug-css-positioning-incorrectly-resizing-container/ )

Example with workaround attempts: http://jsfiddle.net/SyKfm/16/

Reduced structure:

    div: position:absolute or display:inline-block
      div: block element with or without explicit width
      div: float:left
      div: float:left + clear:left

    div: position:absolute or display:inline-block
      div: float:left
      div: float:left + clear:left
      div: block element with or without explicit width

Expected: the parent div should shrinkwrap "nicely" around the two floats and the block element

Symptom: the parent div's width becomes the sum of the two floated element's width, even if the second float is below the first.


Workarounds:
1. replacing clear:left to clear:both on the second float
2. setting float:left on the parent element