Last active
December 21, 2015 18:19
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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