Skip to content

Instantly share code, notes, and snippets.

@matijagrcic
Created March 10, 2015 11:27
Show Gist options
  • Select an option

  • Save matijagrcic/915ca50fac6e2b42dde7 to your computer and use it in GitHub Desktop.

Select an option

Save matijagrcic/915ca50fac6e2b42dde7 to your computer and use it in GitHub Desktop.
/* For responsive YouTube videos */
.embed-container {
position: relative;
padding-bottom: 56.25%; /* 16/9 ratio */
padding-top: 30px; /* IE6 workaround*/
height: 0;
overflow: hidden;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
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