Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The problem, as I said in my comment, is the rounding error in pixels when zooming.</p> <p>Simple example: if you have three 33px wide boxes in a 99px container, and you zoom out to 75%, the boxes will be (rounded) 25 pixels wide, while the container will be 74 pixels wide. And that doesn't fit!</p> <pre><code>.container { width:99px; } .child { float:left; width:31px; height:31px; border:1px solid #666; } </code></pre> <p>See <a href="http://jsfiddle.net/MrLister/pc3kq/" rel="nofollow">fiddle</a>. (Note however, that different browsers have the problem on different zoom factors. Apparently, they don't all round off in the same way. Oh well, at least we can observe that there's a problem.)</p> <p>So, what can we do? Well, there are a number of solutions:</p> <ol> <li><p>Make the container a bit wider, or remove its width constraint altogether, so that it is as wide as the window. Then the boxes will always fit. <a href="http://jsfiddle.net/pc3kq/3/" rel="nofollow">Fiddle</a>.</p></li> <li><p>As an alternative, make the container an inline block instead of giving it a width; that will make sure it fits snugly around its content.</p> <pre><code>.container { display:inline-block; } </code></pre> <p><a href="http://jsfiddle.net/pc3kq/5/" rel="nofollow">Fiddle</a></p></li> <li><p>Give the rightmost box a negative margin, large enough to offset the rounding error. If there's nothing you need to display to the right of the container, you can make this margin as large as you want, it won't make a difference.</p> <pre><code>.child:last-child { margin-right:-100% } </code></pre> <p><a href="http://jsfiddle.net/pc3kq/4/" rel="nofollow">Fiddle</a>.</p></li> </ol> <p>And there are more solutions, but I'm sure these will get you started. Good luck!</p>
    singulars
    1. This table or related slice is empty.
    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.
 

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