Skip to content

Instantly share code, notes, and snippets.

@jamiehs
Created November 25, 2013 23:53
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 jamiehs/7651019 to your computer and use it in GitHub Desktop.
Save jamiehs/7651019 to your computer and use it in GitHub Desktop.
Fluid Video Embeds. Includes modest branding and other niceties in the embed URL.
<div class="fve-video-wrapper">
<iframe width="100%" height="100%" src="https://www.youtube.com/embed/kCIRQuHdBgQ?wmode=transparent&amp;modestbranding=1&amp;autohide=1&amp;showinfo=0&amp;rel=0" frameborder="0" allowfullscreen></iframe>
</div>
.fve-video-wrapper {
position: relative;
overflow: hidden;
height: 0;
padding-bottom: 56.25%;
margin: 1.5em 0; /* A bit of margin at the bottom */
iframe,
object,
embed {
position: absolute;
display: block;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment