Created
November 14, 2024 18:18
-
-
Save nightshft/af41fb207da9afec8fd863939bd66a7a to your computer and use it in GitHub Desktop.
Use this to make YouTube embed codes responsive.
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
| /* Place the iframe into a div with a class of "yt-container" */ | |
| .yt-container { | |
| display: flex; | |
| justify-content: center; | |
| } | |
| .yt-container iframe { | |
| aspect-ratio: 16 / 9; | |
| width: 100% !important; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment