title: How do I make a table element to horizontally overflow it's parent container?
body: <p>How do I make a table element to horizontally overflow it's parent container?
  I would like to avoid setting table width, since it should be sum of the columns.</p>
  <p>I'm trying to set columns widths, but as soon as they reach parents width, they does not grow anymore.</p>
  <p>Following snippet demonstrates two tables with different column widths, but they are both rendered equally. The second table should actually overflow the parent.</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>.container {
    width: 300px;
    background: #ccc;
    overflow: auto;
  }
  
  table {
    table-layout: fixed;
    border-collapse: collapse;
    margin-bottom: 10px
  }
  
  td,
  th {
    border: solid 1px red;
    text-align: center
  }
  
  #table1 col {
    width: 100px
  }
  
  #table2 col {
    width: 200px
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;table id="table1"&gt;
      &lt;colgroup&gt;
        &lt;col /&gt;&lt;col /&gt;&lt;col /&gt;
      &lt;/colgroup&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;A&lt;/th&gt;&lt;th&gt;B&lt;/th&gt;&lt;th&gt;C&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  
    &lt;table id="table2"&gt;
      &lt;colgroup&gt;
        &lt;col /&gt;&lt;col /&gt;&lt;col /&gt;
      &lt;/colgroup&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;A&lt;/th&gt;&lt;th&gt;B&lt;/th&gt;&lt;th&gt;C&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;1&lt;/td&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;3&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>