Skip to content

Instantly share code, notes, and snippets.

@amritk
Created January 14, 2019 23:53
Show Gist options
  • Save amritk/fdfc6d4202058e5c35124f586b6b7a4e to your computer and use it in GitHub Desktop.
Save amritk/fdfc6d4202058e5c35124f586b6b7a4e to your computer and use it in GitHub Desktop.
A bit of style for the youtube iframe
.youtube-wrapper {
position: relative;
padding-bottom: 52%; /* 16:9 */
padding-top: 25px;
height: 0;
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