title: HTML Table width auto in fluid layout and nowrap
body: <p>What I want it the table width to be the width of the elements into the TDs (text or inputs or selects). CSS table width 100% is not the solution, and width auto is not neither. What is the solution then?</p>
  
  <p>Example</p>
  
  <p>CSS</p>
  
  <pre><code>table{width:10px;} //this is the trick I am using but there must be a better solution
  
  td{border:1px solid black;white-space:nowrap;padding-left:10px;padding-right:10px;}
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;td&gt;1&lt;/td&gt;
          &lt;td&gt;Some text... &lt;/td&gt;
          &lt;td&gt;May 2011&lt;/td&gt;
          &lt;td&gt;Edit&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;2&lt;/td&gt;
          &lt;td&gt;Another text... &lt;/td&gt;
          &lt;td&gt;April 2011&lt;/td&gt;
          &lt;td&gt;Edit&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Is working but I do not thing to set the table width to 10px is the solution</p>
  
  <p>Here is a demo Fiddle</p>
  
  <p><a href="http://jsfiddle.net/rM47m/493/" rel="nofollow">http://jsfiddle.net/rM47m/493/</a></p>