title: Table cell widths - fixing width, wrapping/truncating long words
body: <p>I have a table containing cells with text of various lengths. It is essential that all of the table cells are of the same width. If this means truncating long words or forcing a break in long words then that's OK.</p>
  
  <p>I cannot figure out any way of getting this to work.</p>
  
  <p>This is for an internal client application so needs to work in IE6 and IE7 only.</p>
  
  <p>An example page is below. The cell containing <code>onereallylongword</code> is the offending one.</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
      &lt;style type="text/css"&gt;
          td { width: 30px; }
      &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;table border="2"&gt;
          &lt;tr&gt;
              &lt;td&gt;word&lt;/td&gt;
              &lt;td&gt;two words&lt;/td&gt;
              &lt;td&gt;onereallylongword&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>