Site logo

Archived topic

Hello! can you suggest How to add video background in a container?

3 replies · Started by rajat on August 21, 2021

Viewing posts 1–4 of 4

How to add a custom video background in a container?

Hi there,

this article explains how to do it for a Header Element:

https://docs.generatepress.com/article/page-hero-background-video/

The method is the same for any container.

You just need to give the container a class eg. video-background and change this CSS:

.page-hero {
    position: relative;
    overflow: hidden;
}

to:

.video-background {
    position: relative;
    overflow: hidden;
}

Thanks David Sir.
Things you shared worked.but things which still remains
1 As I'm increasing opacity the content is not visible.
what I want is the video background should be normal and content over it to be clearly visible.
2 Mobile version is not working properly
3 Navigation is not working

If you can share a link to the site where i can see the problem i can provide some advise.

This archived topic is closed to new replies.