title: How to set table column width for dynamic drop down list?
body: <p>I have a table with a dynamic drop down list.</p>
  
  <p>The width of the drop down will change depending on its content.</p>
  
  <p>I would like the table column to be the same as the width of the drop down.</p>
  
  <p>If I set a width less than the size of the dropdown IE seems make the column bigger than the drop down whilst wrapping the column title it inserts whitespace on either side of the dropdown.</p>
  
  <p>Is there a way in CSS to say just make the column the same size as its content?</p>
  
  <p>Here is a sample html table that includes my current fix (kludge)</p>
  
  <pre><code>&lt;table id="mappingtable" width="100%" align="center" cellspacing="0" cellpadding="0" border="0"&gt;
    &lt;tr&gt;
      &lt;th width="80px"&gt;FixedWidthColumn&lt;/th&gt;
      &lt;th width="80%"&gt;ExpandingColumn&lt;/th&gt;
      &lt;th width="122px"&gt;&amp;nbsp;&lt;/th&gt;
      &lt;th&gt;DynamicColumn&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td align="center"&gt;1&lt;/td&gt;
      &lt;td&gt;Text&lt;/td&gt;
      &lt;td align="center"&gt;Button&lt;/td&gt;
      &lt;td align="center"&gt;DropDownList&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The problem exists without any css</p>
  
  <p>If I remove the width="80%" from the expanding column the dynamic column will have whitespace</p>
  
  <p>I have tried width: auto on the dynamic column and setting it to a fixed width but none of these work for me</p>