Skip to content

Instantly share code, notes, and snippets.

@jenswittmann
Last active December 21, 2015 18:19
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 jenswittmann/6346133 to your computer and use it in GitHub Desktop.
Save jenswittmann/6346133 to your computer and use it in GitHub Desktop.
Looking for responsive embed Videos? Hier is the CSS only trick. You only have to remove width/height in the <iframe> tag. Thanks to www.andmag.se/2011/11/responsive-embeds
.embed {
position: relative;
overflow: hidden;
height: 0;
padding-bottom: 56.25%; /* 16/9 ratio */
padding-top: 30px; /* IE6 workaround*/
iframe {
position: absolute;
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