Skip to content

Instantly share code, notes, and snippets.

@cre8tivediva
Created December 27, 2017 18:44
Show Gist options
  • Save cre8tivediva/6926872370e82ac221c7a8c89784b986 to your computer and use it in GitHub Desktop.
Save cre8tivediva/6926872370e82ac221c7a8c89784b986 to your computer and use it in GitHub Desktop.
Responsive Video iFrame Code
<div class="video-code">ADD YOUR IFRAME</div>
.video-code {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;
height: auto;
}
.video-code iframe,
.video-code object,
.video-code 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