Skip to content

Instantly share code, notes, and snippets.

@bcamargogui
Created May 24, 2018 18:19
Show Gist options
  • Save bcamargogui/01b96ac46db796720b026f25f512449a to your computer and use it in GitHub Desktop.
Save bcamargogui/01b96ac46db796720b026f25f512449a to your computer and use it in GitHub Desktop.
Responsive iframe
.div-iframe {
position: relative;
padding-bottom: 56.25%; /* 16:9 */
padding-top: 25px;
height: 0;
}
.div-iframe 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