title: Iframe responsive height and width fit to content
body: <p>I've build an iframe that embed an html like the following:</p>
  
  <pre><code>&lt;div class="document"&gt;                            
    &lt;iframe src="http://localhost:8080/doc625.htm"&gt;
   &lt;/iframe&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>While these are the classes that I've apply to the div and the iframe:</p>
  
  <pre><code>.document {
      position: relative; 
      width: 100%; 
      height: 0; 
      padding-bottom: 50%;
      padding-top: 50%;
      overflow: hidden;
  }
  
  .document iframe {
      position: absolute; 
      left: 0; 
      top: 0; 
      width: 100%; 
      height: 100%;
  
  }
  </code></pre>
  
  <p>The problem is that when I try to expand the screen, the height of the Iframe doesn't fit to their content.</p>
  
  <p>How can I fix it?</p>
  
  <p>These are the screenshots:</p>
  
  <p>100% zoom</p>
  
  <p><a href="https://i.stack.imgur.com/yjAjs.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yjAjs.jpg" alt="enter image description here"></a></p>
  
  <p>50% zoom</p>
  
  <p><a href="https://i.stack.imgur.com/mtac8.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mtac8.jpg" alt="enter image description here"></a></p>