title: Adjusting IFrame Height only Chrome
body: <p>SO I know this solution is somewhere but I can't find it. I've been digging for about a day into google and stackOverflow. </p>
  
  <p>Basically, I have an iframe and I'm trying to get it to expand to the size of its contents, a pretty simple task. I went through several methods, looking at different heights etc. But for some gosh darn reason, Chrome does not want to put up with me. 
  So here is the javascript to resize the IFrame. To make sure JS was working and to read the height I threw in that innerHTML piece (sort of like debugging)</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  function resizeFrame() {
       var t=document.getElementById("Footer");
       var f = document.getElementById("mainContent");
       var y = f.contentWindow;
  
       t.innerHTML = y.document.body.offsetHeight;
       f.height = y.body.offsetHeight;
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>Here's the iframe:</p>
  
  <pre><code>    &lt;iframe onload="resizeFrame()" id="mainContent" src="homec.html" scrolling=auto frameborder=0 height="100%" width="100%"&gt;
      Not working!&lt;/iframe&gt;
  </code></pre>
  
  <p>So for some odd reason, it does not want to work, pretty much hates me in Chrome. But it works in Firefox and IE. Any solutions??</p>