Skip to content

Instantly share code, notes, and snippets.

@m-pokrovskii
Created May 5, 2015 06:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m-pokrovskii/b57a3cf15cac76ca07fc to your computer and use it in GitHub Desktop.
Save m-pokrovskii/b57a3cf15cac76ca07fc to your computer and use it in GitHub Desktop.
Responsive Video
<style>
.videoWrapper {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
.videoWrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
</style>
<div class="videoWrapper">
<!-- Copy & Pasted from YouTube -->
<iframe width="560" height="350" src="https://www.youtube.com/watch?v=ggyIqOItvE4" frameborder="0" allowfullscreen></iframe>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment