Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This has to do with the browser's calculations of the percentage values.</p> <p>You are attempting to use up exactly 100% of the browser width among the various components. For example, if the browser attempts to calculate what 23% of the browser width is four times and then calculates what 1% of the margin is 8 times (adding up to an expected 100%), there in no guarantee that the sum of those components will not be over the actual width of the browser window after rounding. Certain total widths will work while others will not.</p> <p>Lets break this down with some math. If we constrain our width to a width of 503px, we could do the calculations as follows and see that we exceed our maximum width.</p> <blockquote> <p>503px * 0.23 <em>width</em> = 115.69 ≈ 116px</p> <p>503px * 0.01 <em>margin</em> = 5.03 ≈ 5px</p> <p>(4 <em>boxes</em> * 116px <em>per box</em>) + (4 <em>boxes</em> * 2 <em>margins</em> * 5px <em>per margin</em>) = 464px + 40px = <strong>504px</strong></p> </blockquote> <p><strong><a href="http://jsfiddle.net/Cs4YB/" rel="nofollow">DEMO (Incorrect Behavior)</a></strong> - Max width set to <code>503px</code></p> <p>However, if we constrain our width to 500px, the calculations just happen to work out the way we would expect.</p> <blockquote> <p>500px * 0.23 <em>width</em> = 115px</p> <p>500px * 0.01 <em>margin</em> = 5px</p> <p>(4 <em>boxes</em> * 115px <em>per box</em>) + (4 <em>boxes</em> * 2 <em>margins</em> * 5px <em>per margin</em>) = 460px + 40px = <strong>500px</strong></p> </blockquote> <p><strong><a href="http://jsfiddle.net/Cs4YB/1/" rel="nofollow">DEMO (Correct Behavior)</a></strong> - Max width set to <code>500px</code></p> <p>This only occurs for the items on the right edge of the page because that is where wrapping will occur. Items that are set to <code>float: left</code> will wrap when there is not enough available horizontal space. That is why the item essentially goes to the first spot on the next line. </p> <p>The actual issue appears to be triggered by additional calculations and DOM manipulation performed by jQuery UI during sorting given that the initial state is unaffected.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload