title: Vertically center a youtube video in container
body: <p>I have a responsive Youtube video which I've put in a container with a max-height. The video is cropped at the bottom. Is there a way to crop the top and the bottom equally so the video is centered vertically within the container and the play button is in the middle?</p>
  
  <p>JS Fiddle here: 
  <a href="https://jsfiddle.net/3qtawjb7/" rel="nofollow">https://jsfiddle.net/3qtawjb7/</a></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>.video-outer {
    max-height: 200px;
    overflow: hidden;
    position: relative;
  }
  .video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
  }
  .video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="video-outer"&gt;
    &lt;div class="video-container"&gt;
      &lt;iframe id="player" frameborder="0" allowfullscreen="1" title="YouTube video player" width="640" height="360" src="https://www.youtube.com/embed/feLDAys0v-c"&gt;&lt;/iframe&gt;
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>