title: IE7 relative/absolute positioning bug with dynamically modified page content
body: <p>I was wondering if there's anyone having an idea how to tackle with the following problem in IE7:</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;title&gt;IE7 absolute positioning bug&lt;/title&gt;
      &lt;style type="text/css"&gt;
        #panel { position: relative; border: solid 1px black; } 
        #spacer { height: 100px; } 
        #footer { position: absolute; bottom: 0px; }
      &lt;/style&gt;
      &lt;script type="text/javascript"&gt; 
        function toggle() { 
          var spacer = document.getElementById("spacer"); 
          var style = "block"; 
          if (spacer.style.display == "block" || spacer.style.display == "") { 
            style = "none"; 
          }
          spacer.style.display = style;
        }
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;div id="panel"&gt;
        &lt;button onclick="toggle();"&gt;Click me&lt;/button&gt;
        &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
        &lt;div id="spacer"&gt;&lt;/div&gt;
        &lt;div id="footer"&gt;This is some footer&lt;/div&gt;
      &lt;/div&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>When you run this in IE7 you'll see that the "footer" element stays after modifying the CSS for "panel". The same example tested in IE8, FF and Chrome behaves exactly as expected.</p>
  
  <p>I've already tried updating the element's class but this does not work if the browser's window has been opened maximized and no further size changes were made to the window (which is about 90% of the use cases we have for our product.... :( )
  I'm stuck with a CSS-based solution however I think that I can make an exception in this case if it can easily be made IE7-specific (which means that other browsers will behave in a standard way with this).</p>
  
  <p>Please help! </p>