Last active
December 15, 2015 15:08
-
-
Save phette23/5278999 to your computer and use it in GitHub Desktop.
Markup for making a fluid-width YouTube video embed. Better to do it in markup than use FitVids, where the markup was taken from.
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
<!-- just replace {{id}} with the video's ID | |
e.g. 9bZkp7q19f0 --> | |
<div style="width:100%;position:relative;padding:0;padding-top:75%"> | |
<iframe | |
style="position:absolute;top:0;left:0;width:100%;height:100%;" | |
src="http://www.youtube-nocookie.com/embed/{{id}}?rel=0" | |
frameborder="0" allowfullscreen mozallowfullscreen webkitallowfullscreen> | |
</iframe> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment