Skip to content

Instantly share code, notes, and snippets.

@uglyeoin
Forked from sobstel/responsive_youtube.css
Last active November 8, 2021 17:08
Show Gist options
  • Save uglyeoin/b71080855494182761c6932e95d468ac to your computer and use it in GitHub Desktop.
Save uglyeoin/b71080855494182761c6932e95d468ac to your computer and use it in GitHub Desktop.
Inline Responsive embedded youtube video
<div style="position: relative; padding-bottom: 56.25%; padding-top: 25px; height: 0;">
<!-- Copy & Pasted from YouTube you need to add in the style elements, or simply replace the video URL only -->
<!-- style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" -->
<iframe style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" width="100%" height="315" src="https://www.youtube.com/watch?v=vpbMiohTWwM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment