title: Why isn't this HTML table working properly in Chrome?
body: <p>Consider this simple HTML table:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Test&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;table style="border-collapse: collapse; table-layout: fixed; width: 280px;"&gt;
          &lt;tr&gt;
              &lt;td style="padding: 5px; width: 50px; border: 0; word-wrap: break-word;"&gt;a&lt;/td&gt;
              &lt;td style="padding: 5px; width: 100px; border: 0; word-wrap: break-word;"&gt;b&lt;/td&gt;
              &lt;td style="padding: 5px; width: 100px; border: 0; word-wrap: break-word;"&gt;c&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This renders properly in every major browser, except in Chrome, in which the column widths bizarrely come out as 46px, 102px and 102px respectively.</p>
  
  <p>If I take the CSS width declaration out of the table element, then it renders correctly in Chrome. But I need this in there, otherwise word-wrapping won't work correctly.</p>
  
  <p>Any idea why this isn't working? I've tried different doctypes and this hasn't changed anything, so I'm assuming it's not an HTML5 table problem.</p>
  
  <p><strong>EDIT:</strong> It turns out that if you specify <code>table-layout: fixed</code> <em>and</em> a pixel width on the <code>table</code> element <em>and</em> pixel widths on each column, then Chrome will assume that your column widths <em>include</em> padding. This contravenes the W3C box model and is in violation of CSS2 required behaviour.</p>
  
  <p>If you don't specify <code>table-layout: fixed</code> or you don't specify a pixel width on the <code>table</code> element, then Chrome will correctly assume your column widths that you specify <em>exclude</em> padding.  All other browsers assume that your column widths <em>exclude</em> padding.</p>
  
  <p>In the example above, specifying the widths as 60px, 110px and 110px would fix the problem in Chrome but then break it in every other browser. The values of 46px, 102px and 102px come from Chrome evenly distributing the columns with a ratio of 40:90:90 instead of 50:100:100.</p>