Created
May 19, 2017 19:22
-
-
Save nixon1333/5cf1dfd962ff943fa93ed2a7fd614468 to your computer and use it in GitHub Desktop.
Make iframe responsive
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
.myIframe { | |
position: relative; | |
padding-bottom: 65.25%; | |
padding-top: 30px; | |
height: 0; | |
overflow: auto; | |
border: solid black 1px; | |
width: 100%; | |
} | |
.myIframe iframe { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
} |
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
<div class='myIframe' > | |
<iframe> </iframe> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment