When your website means business.

CSS, Responsive, Video | Type: CSSEmbed Responsive YouTube Videos

First, the CSS:

.youtube-video { aspect-ratio: 16 / 9; width: 100%; }

Then add the class to the iframe embed code:

<iframe class="youtube-video" src="https://www.youtube.com/embed/xxxxxx" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Reference Links

We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Cookies Notice