title: How are table cell widths calculated in html?
body: <p>Consider the following code: <a href="http://jsfiddle.net/R3AKT/1/" rel="noreferrer">http://jsfiddle.net/R3AKT/1/</a>.</p>
  
  <pre><code>&lt;table class="main"&gt;
    &lt;colgroup&gt;&lt;col class="votes"&gt;&lt;col&gt;&lt;/colgroup&gt;
    &lt;tr&gt;
      &lt;td&gt;Votes&lt;/td&gt;
      &lt;td&gt;Comments&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;
        &lt;p class="vote-desc"&gt;Some long name, really long, like really super long&lt;/p&gt;
        &lt;p class="vote-desc"&gt;Another long name, really long&lt;/p&gt;
      &lt;/td&gt;
      &lt;td&gt;
        &lt;p class="comment"&gt;A really, really, really, really, really really really really really, really long comment.&lt;/p&gt;
       &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The way that the table is rendered here makes sense to me, since there are no widths set on anything and the table is <code>table-layout: fixed;</code>. According to the <a href="http://www.w3.org/TR/CSS21/tables.html#fixed-table-layout" rel="noreferrer">CSS 2.1 spec</a> and also <a href="http://css-tricks.com/complete-guide-table-element/" rel="noreferrer">CSS Tricks</a>, since there are no widths specified for the cells or the columns, the total table width is distributed between the two cells.</p>
  
  <p>Now, consider the following code (same, but with more content in the second cell): <a href="http://jsfiddle.net/8vzRb/1/" rel="noreferrer">http://jsfiddle.net/8vzRb/1/</a></p>
  
  <p>In this case, since there is more content in the second cell it takes up more room. But, and I quote the CSS 2.1 spec on this, the widths of the two cells should be divided in the following way: "Any remaining columns equally divide the remaining horizontal table space (minus borders or cell spacing)." Clearly, these columns are not equal: the right one takes up much more space than the left one.</p>
  
  <p>My question is this: is there any standard way to know exactly how much space, as a percentage or some other value of the total table width, will be taken up by each cell in this example, depending on the content of the cells? How does this calculation work, and is it standard?</p>
  
  <p>(I know how to fix the issue: you can simply set a <code>width: 200px</code> or something on the columns in a colgroup OR on the cells in the first row of the table; I'm simply curious as to how this works. Follow-up question: why does setting a <code>width: 200px;</code> like in <a href="http://jsfiddle.net/bQ6vH/1/" rel="noreferrer">http://jsfiddle.net/bQ6vH/1/</a> change the width of the left cell, but setting a min-width: 100px; does not?)</p>