title: Why is height:auto not working on 2 floating elements?
body: <p>The <code>div#inner1</code> and <code>div#inner2</code> are inside the <code>div#outer</code>, but still the height of <code>div#outer</code> shows as 0px with <code>height:auto</code>.</p>
  
  <p>How do I get the height of the child elements for the outer div?</p>
  
  <p>This is my code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#outer {
    width: 300px;
    height: auto;
    background: #ccc;
  }
  
  #inner1 {
    float: left;
    width: 100px;
    height: 100px;
    background: #f00;
  }
  
  #inner2 {
    float: left;
    width: 100px;
    height: 100px;
    background: #0f0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="outer"&gt;
    &lt;div id="inner1"&gt;&lt;/div&gt;
    &lt;div id="inner2"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>