-
-
Save locvfx/ff9c0ec68b5768f1a95b483325b20b93 to your computer and use it in GitHub Desktop.
How To Make a Responsive 100% Width YouTube iFrame Embed #HTML #CSS #youtube
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
| .container { | |
| position: relative; | |
| width: 100%; | |
| height: 0; | |
| padding-bottom: 56.25%; | |
| } | |
| .video { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| } |
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
| <div class="container"> | |
| <iframe src="//www.youtube.com/embed/yCOY82UdFrw" | |
| frameborder="0" allowfullscreen class="video"></iframe> | |
| </div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment