title: flexbox html5 video fill remaining space
body: <p>I try to have a html5 video that fills the remaining space in a flexbox div.</p>
  
  <p>However, it overflows rather than doing what I want:</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>.wrapper {
    padding: 10px;
    display: flex;
    flex-direction: column;
    max-height: 300px;
    background-color: green;
  }
  .content {
    width: 100%;
    background-color: red;
  }
  video {
    width: 100%;
    height: 100%;
  }
  .footer {
    width: 100%;
    background-color: orange;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="wrapper"&gt;
    &lt;div class="content"&gt;
      &lt;video src="http://www.sample-videos.com/video/mp4/720/big_buck_bunny_720p_1mb.mp4" /&gt;
    &lt;/div&gt;
    &lt;div class="footer"&gt;footer&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><a href="https://jsfiddle.net/pwhwL29p/" rel="nofollow noreferrer">https://jsfiddle.net/pwhwL29p/</a></p>