Created
April 21, 2020 10:27
-
-
Save gavinmcfarland/18ebeadf3cfeaa3263501faa68554a9f to your computer and use it in GitHub Desktop.
Creating responsive/fluid iframes
This file contains 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; | |
padding-bottom: 56%; | |
} | |
.iframe-container iframe { | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
left: 0; | |
top: 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment