Skip to content

Instantly share code, notes, and snippets.

@brutaldesign
Last active October 18, 2019 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brutaldesign/9774274 to your computer and use it in GitHub Desktop.
Save brutaldesign/9774274 to your computer and use it in GitHub Desktop.
Fluid Video CSS
.fluid-video{
display:block;
width: 100%;
height: 0;
padding-bottom: 56.25%; /* 16/9 format */
overflow: hidden;
position: relative;
}
.fluid-video iframe, .fluid-video embed, .fluid-video object{
width: 100%!important; height: 100%!important;
position: absolute;
top: 0; left: 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment