Archived topic
Set background video in Elements as we did on Page Headers
11 replies · Started by Ivan Cazorla on August 29, 2018
Hi there,
I was wondering how I can use a video background instead of a color background in the new Elements module as we could do before on the Page Header module.
Is this still possible to do? Or has this function been removed? I'd love to use background videos.
Thanks,
Ivan
Hi Ivan,
this is what you're looking for:
https://docs.generatepress.com/article/page-hero-background-video/
It provides a lot more flexibility then the old baked in method.
Hi there,
Thank you. Interesting move, I'll give it a shot.
Thanks again,
Ivan
Hi there,
I've got everything set up now and it's working, but the poster image it's not placed correctly when loads the website. See screenshot here: https://snag.gy/e7TQz9.jpg
Thank you,
Ivan
Hi again. See here the image on the phone in horizontal mode: image here
thanks again,
Ivan
Hi Ivan,
can you share a link to the site?
Sure, here it is: https://ivancazorla.com/
thanks,
Ivan
What happens if you add this CSS?:
video[poster] {
object-fit: cover;
width: 100%;
height: 100%;
}
I’ve already did that.
Thanks,
Ivan
Without the media query?
Oh, okay. Just fixed that. Looks like it’s working now.
Thanks again,
Ivan
You're welcome :)