title: Fill window with iFrame and not show scrollbars?
body: <p>How can I make my iframe fill the window and not display any scrollbars?</p>
  
  <p>This works for IE6, I would like to get it to work for all browsers if possible:</p>
  
  <pre><code>&lt;iframe name=iframe1 src="theSiteToShow.html"  width="100%" height="100%" frameborder="0" marginheight="10" marginwidth="10"&gt;&lt;/iframe&gt;
  &lt;script type="text/javascript"&gt;
  function resizeIframe() {
      var height = document.documentElement.clientHeight;
      height -= document.getElementById('frame').offsetTop;
  
      // not sure how to get this dynamically
      height -= 20; /* whatever you set your body bottom margin/padding to be */
  
      document.getElementById('frame').style.height = height +"px";
  
  };
  document.getElementById('frame').onload = resizeIframe;
  window.onresize = resizeIframe;
  &lt;/script&gt;
  </code></pre>