title: How to choose which column shrink to fit table width?
body: <p>I have a table with various columns and a fixed width. The premise is that some of the columns should always be fully displayed. So whenever the table's width exceds the container limit a selected column will reduce it's width so the others are not afected.</p>
  
  <p>From this example the desired result would be the first and last column always showing their content while the middle one is shortened to acomplish that.</p>
  
  <p><a href="https://jsfiddle.net/quz7jdk8/1/" rel="nofollow noreferrer">https://jsfiddle.net/quz7jdk8/1/</a></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>#content {
    border: 1px solid;
    max-width: 220px;
    overflow: hidden;
  }
  
  table th,
  table td {
    white-space: nowrap;
    text-overflow: ellipsis;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div id="content"&gt;
    &lt;table&gt;
      &lt;thead&gt;
        &lt;tr&gt;
          &lt;th&gt;qnty&lt;/th&gt;
          &lt;th&gt;desc.&lt;/th&gt;
          &lt;th&gt;total&lt;/th&gt;
        &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
        &lt;tr&gt;
          &lt;td&gt;0.2222222&lt;/td&gt;
          &lt;td&gt;weigth product&lt;/td&gt;
          &lt;td&gt;255555.00&lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
          &lt;td&gt;1&lt;/td&gt;
          &lt;td&gt;prod&lt;/td&gt;
          &lt;td&gt;1.00&lt;/td&gt;
        &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Optional: If possible the shortened column should have a <code>text-overflow: ellipsis;</code> behaviour.</p>
  
  <p>Additional info I forgot to mention:</p>
  
  <ul>
  <li><p>The container width can not be modified under any circumstances.</p></li>
  <li><p>No scrolls should be shown since the result will be printed in paper.</p></li>
  <li><p>The content of the tbody rows is dynamic. So the problem shows up when the length of the cell's content makes the table larger than the container (like it's shown in the example).</p></li>
  </ul>