Hi again,
I have a pro header where I have a background video playing (from YouTube)
How can I get the video to FORCE cover, i.e. not display with any black bars top/bottom side/side.
I was trying to add following CSS to the iframe, but have been un-successful.
position: fixed;
top: 50%; left: 50%;
z-index: 1;
min-width: 100%;
min-height: 100%;
width: auto;
height: auto;
transform: translate(-50%, -50%);
[EDITED] - RESOLVED
Hi @rad - I finally managed to do this.
adding following css
/* Video force cover */
/* taken from https://stackoverflow.com/questions/24579785/force-iframe-youtube-video-to-center-fit-and-full-cover-the-screen-in-the-backgr*/
@media (min-aspect-ratio: 16/9) {
.x-video-inner { height: 300% !important; top: -100% !important; }
}
@media (max-aspect-ratio: 16/9) {
.x-video-inner { width: 300% !important; left: -100% !important; }
}