Skip to content

Instantly share code, notes, and snippets.

@uglyeoin
uglyeoin / responsive_youtube_inline
Last active November 8, 2021 17:08 — forked from sobstel/responsive_youtube.css
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>