Skip to content

Instantly share code, notes, and snippets.

@carlossalas
Last active October 15, 2020 22:13
Show Gist options
  • Save carlossalas/1ea512570f2d1e8e7c11871cfaf1ae7c to your computer and use it in GitHub Desktop.
Save carlossalas/1ea512570f2d1e8e7c11871cfaf1ae7c to your computer and use it in GitHub Desktop.
Video Aspect Ratio
.video-aspect-ratio {
position: relative;
width: 100%;
height: 0;
padding-bottom: 55%;
iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0; top: 0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment