title: Iframe creates extra space below
body: <p>Why does an iframe add extra space under its element? Look at this weird behavior:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.border {
      background: red;
      width: 300px;
      height: 200px;
      border: 1px solid green;
      overflow: visible;
      margin: 0;
      padding: 0;
  }
  
  .border iframe {
      border: none;
      width: 300px;
      height: 100px;
      margin: 0;
      padding: 0;
      opacity: 0.8;
  }
  
  .border .lower {
      height: 100px;
      margin: 0;
      padding: 0;
      background: blue;
      opacity: 0.8;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="border"&gt;
    &lt;iframe src="https://example.com"&gt;&lt;/iframe&gt;
    &lt;div class="lower"&gt;&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><img src="https://i.stack.imgur.com/LsC8x.png" alt=""></p>
  
  <p>How to work around?</p>