title: Contain table within div
body: <p>Given this example, try making your window smaller such that the size of the example is squished.</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>div {
      padding: 1em;
      background: #2424c6
  }
  
  table {
      width: 100%;
  }
  
  input {
      width: 150px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div&gt;
      &lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;input type="text"/&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="text"/&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="text"/&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="text"/&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;input type="text"/&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>You will note that the textboxes (correctly) do not wrap to new lines as they are in individual <code>&lt;td&gt;</code>s.</p>
  <p>However, the containing <code>div</code>, as denoted by the blue colour, does not completely wrap the table.</p>
  <p>How can I make the containing <code>div</code> fully contain the child <code>table</code>?</p>