title: Set iframe to height of content for remote content
body: <p>The question of how to make your iframe fit 100% of your content (using JavaScript) has been answered on the forum already... <em>for iframes displaying content from the same domain only</em>.</p>
  
  <p>My questions: Is it possible to resize an iframe to fit the content when the iframe src attribute is for a page outside of the domain of the page containing the frame? The browser security features surrounding cross-site scripting prevent me from accessing the document object for the iframe.</p>
  
  <p>I'm looking for any creative solution. One of my thoughts was to somehow detect that scrollbars were visible on the iframe, and to incrementally increase the height until they weren't. Unfortunately I can't find any way to detect visible scrollbars either. Ideas?</p>
  
  <p>Please note that I am looking for a client-side solution.</p>
  
  <p>Responses:</p>
  
  <hr>
  
  <h2>Dave</h2>
  
  <p>The problem still exists - I don't know the height of the remote document ahead of time, so I can't set it from a database or querystring value.</p>
  
  <hr>
  
  <h2>dusoft</h2>
  
  <p>100% on the iframe in CSS will not set it to 100% of the content <em>inside</em> the iframe, but relative to the the page or containing element (i.e., a div or something).</p>