Skip to content

Instantly share code, notes, and snippets.

@jimfloss
Created January 30, 2018 17:56
Show Gist options
  • Save jimfloss/3b6db81bf9032da72893df7a8a3ce25b to your computer and use it in GitHub Desktop.
Save jimfloss/3b6db81bf9032da72893df7a8a3ce25b to your computer and use it in GitHub Desktop.
Responsive Video CSS
.video-wrapper {
position: relative;
width: 100%;
height: 0;
padding-bottom: 56.25%;
margin: 0px auto;
}
.video-wrapper 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