Created
February 9, 2017 15:46
-
-
Save apmarshall/5827fc81f6f5c8bbd08c1cbd787d791e to your computer and use it in GitHub Desktop.
Responsive i-frames
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.iframe-container { | |
position: relative; | |
height: 0; | |
overflow: hidden; | |
margin-top: 16px; | |
margin-bottom: 16px; | |
} | |
.iframe-container-16x9 { | |
padding-bottom: 56.25%; | |
} | |
.iframe-cotainer-4x3 { | |
padding-bottom: 75%; | |
} | |
.iframe-container-10x9 { | |
padding-bottom: 90%; | |
} | |
.iframe-container 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