title: How to get rid of empty space on the right of a container with floating items?
body: <p>When I use floating itens inside a container, like:</p>
  
  <p><strong>The Code (<a href="http://jsfiddle.net/tombrito/gx7kL330/7/" rel="nofollow noreferrer">http://jsfiddle.net/tombrito/gx7kL330/7/</a>):</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.container {
    background: blue;
    position: absolute;
    width: auto;
  }
  .floating-box {
    float: left;
    width: 150px;
    height: 75px;
    margin: 10px;
    border: 3px solid #73AD21;  
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;div class="floating-box"&gt;Floating box&lt;/div&gt;
    &lt;div class="floating-box"&gt;Floating box&lt;/div&gt;
    &lt;div class="floating-box"&gt;Floating box&lt;/div&gt;
    &lt;div class="floating-box"&gt;Floating box&lt;/div&gt;
    &lt;div class="floating-box"&gt;Floating box&lt;/div&gt;
    &lt;div class="floating-box"&gt;Floating box&lt;/div&gt;
    &lt;div class="floating-box"&gt;Floating box&lt;/div&gt;
    &lt;div class="floating-box"&gt;Floating box&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>...if I resize the window, I see that the <code>width: auto</code> of the container is not exactly the width of the contents:</p>
  
  <p><a href="https://i.stack.imgur.com/dqpHo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dqpHo.png" alt="enter image description here"></a></p>
  
  <p>There is some empty space on the right. Is there a way to make the container really be the width of the floating children, even when I resize it?</p>