[For 1.8] make youtube videos responsive
(2021-02-26, 09:49 AM)[ExiTuS] Wrote: Better use this solution for responsive video elements (also respecting 16:9 ratio):

Example YouTube

Template: video_youtube_embed
<div class="video_container">
<iframe class="video_iframe" src="//www.youtube.com/embed/{$id}" allowfullscreen></iframe>

Style: global.css
.video_container { position: relative; overflow: hidden;width: 100%; padding-top: 56.25%; }
.video_iframe { position: absolute; width: 100%; height: 100%; top: 0; bottom: 0; left: 0; right: 0; }


There is a problem with this solution, and the original op, is also correct and here is why, so many videos are coming out, like Rumble, and Odysee, that all use embedded videos. So there has to be method to style iframes

the original OP solution is perfect.
Hey man, what's up?

Messages In This Thread
make youtube videos responsive - by Alhimika - 2021-02-26, 12:01 AM
RE: make youtube videos responsive - by [ExiTuS] - 2021-02-26, 09:49 AM
RE: make youtube videos responsive - by Michael2014 - 2021-12-21, 06:38 AM

Forum Jump:

Users browsing this thread: 1 Guest(s)