Skip to content

Instantly share code, notes, and snippets.

@kikmedia
Created September 24, 2019 07:19
Show Gist options
  • Save kikmedia/0f859c0c7b20a8d9783df1daf1c55eda to your computer and use it in GitHub Desktop.
Save kikmedia/0f859c0c7b20a8d9783df1daf1c55eda to your computer and use it in GitHub Desktop.
CSS for responsive Youtube videos
/* youtube integration */
.ce_youtube {
position: relative;
padding-bottom: 56.25%;
width: 100%;
height: auto;
}
.ce_youtube iframe {
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
width: 100% !important;
height: 100% !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment