title: IE7 DIV expands to fit TABLE, ignoring HEIGHT% directive
body: <p>I'd really appreciate a hand getting my fixed-header table scrolling in IE7.</p>
  
  <p>In IE7, my tall data table is forcing its containing DIV to expand vertically, and preventing that DIV's scrollbar from showing. I'm using the excellent cross-browser (including IE7) scrolling, fixed-headers table layout solution from:
    <a href="http://www.sitepoint.com/forums/showthread.php?t=615364&amp;page=3" rel="nofollow">http://www.sitepoint.com/forums/showthread.php?t=615364&amp;page=3</a>
  , but I've modified it so that the table fills the page.</p>
  
  <p>Here's how that looks in-practice:</p>
  
  <pre><code>&lt;style&gt;
  html, body { width: 100%; height: 100%; padding: 0; margin: 0; }
  #results { position: absolute; top: 2em; bottom: 0; width: 100%; }
  #results div { width: 100%; height: 100%; overflow: auto; overflow-x: hidden; }
  #results table { width: 100%; }
  #results table th p { position: absolute; top: -2em; }
  &lt;/style&gt;
  &lt;body&gt;
    &lt;div id='results'&gt; &lt;!-- provides position referece to headers --&gt;
      &lt;div&gt;            &lt;!-- scrolls the table it contains --&gt;
        &lt;table&gt;        &lt;!-- incorrectly expands parent div in IE7 --&gt;
          &lt;tr&gt;&lt;th&gt;&lt;p&gt;FIXED-HEADER HERE&lt;/p&gt;&lt;/th&gt;&lt;/tr&gt;
          &lt;tr&gt;&lt;td&gt;TALL CONTENT HERE&lt;/td&gt;&lt;/tr&gt;
        &lt;/table&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>I'm happy with how the headers and scrolling work in FF and IE8. Debug kit in IE7 shows that #results has the desired height, but both DIV and TABLE share the same extremely tall value, where DIV should actually be the height of #results. If I change DIV height from % to px units, it scrolls, but of course no longer resizes properly.</p>
  
  <p>I'm using strict doctype. My table actually contains tabular data, typically 10 columns and 200 rows, so a table is semantically accurate. There's actually more content around this table of course.</p>
  
  <p>I'd prefer not to use javascript for dynamic dimensions, unless it is so simple that it's bulletproof, since I always end up with stupid defects (oh, yeah, I didn't think to re-evaluate size when you hover over hyperlinks and the line height changes, etc.).</p>
  
  <p>Thank you,
  Shannon</p>