title: CSS: how to make the widths of the columns as wide as the longest text
body: <p>I open this post after I looked at this post without success: <a href="https://stackoverflow.com/questions/15210183/how-to-set-table-column-widths-to-the-longest-value-excluding-header">How to set table column widths to the longest value, excluding header</a></p>
  
  <p>I want to draw a table, and I want that the width of each column will be compatible to the longest text in this column. For example, if the following values lie in column A: "abc", "abcd", "abcde", the width of column A will be 5 characters long. </p>
  
  <p>I tried:</p>
  
  <pre><code>td {
    white-space: nowrap;
    overflow: hidden;
  }
  </code></pre>
  
  <p>How can I do it?</p>