title: Can I use jQuery to resize an iframe to fill the remaining window space?
body: <p>I have a div of height 90 pixels. Below it is an iframe.</p>
  
  <p>I would like to figure out how to write javascript (or jQuery) to always set the iframe to the correct height to occupy the rest of the screen. If there is a better HTML5-based solution I would love to know about that too of course.</p>
  
  <h2>Javascript:</h2>
  
  <pre><code>$(document).ready(function() {
  
      var $window = $(window);
      function checkSize() 
      {
          var windowHeight = $window.height();
          var frameHeight = windowHeight - 90;
          $('iframe').height() = frameHeight; 
      }
      checkSize();
      $(window).resize(checkSize);
  
  });
  </code></pre>
  
  <h2>HTML:</h2>
  
  <pre><code>&lt;body style="overflow:hidden;"&gt;
  &lt;div style="height:90px;"&gt;
  Content goes here
  &lt;/div&gt;
  
  &lt;iframe src="www.someurl.com" style="width:100%; height:900px; seamless: seamless; frameborder: 0;"&gt;&lt;/iframe&gt;
  &lt;/body&gt;
  </code></pre>