- This topic has 5 replies, 2 voices, and was last updated 2 years, 5 months ago by Elvin.
-
AuthorPosts
-
November 11, 2021 at 9:06 pm #2000970Andy
Hi there,
I’ve been reviewing this help file:
https://docs.generatepress.com/article/page-hero-background-video/1. Although, I don’t understand where to add this code in the Element?
<video loop muted autoplay poster="URL/TO/poster.jpg" class="background-video"> <source src="URL/TO/video.mp4" type="video/mp4"> <source src="URL/TO/video.webm" type="video/webm"> <source src="URL/TO/video.ogv" type="video/ogv"> </video> <div class="background-video-content"> Your Element content in here. </div>
2. Can I also overlay the video with a Headline? “Welcome to our site”
3. How do I control the hieght size of the video page hero on the homepage?
Screenshot here, where do I add the code on this page? Thank you
November 11, 2021 at 10:06 pm #2001000ElvinStaffCustomer SupportHi Andy,
Place a Container block first to serve as the Page Hero’s main container.
Within this container, add a Custom HTML block.
On this Custom HTML block you can place the code you’ve provided. 😀
Note: That’s just one part of it. As for the CSS, here’s how to add it to your site –
https://docs.generatepress.com/article/adding-css/November 11, 2021 at 10:19 pm #2001006Andy1. Thank you, how do I control the height size of this container? The video just expands like crazy on the homepage. I tried playing with the padding of the container but nothing responds to make it smaller. Thoughts? I shared the URL.
2. I’ve also kept my homepage content intact in order to show a button and headline. That is correct logic right? If I want to overlay content on the video?
November 11, 2021 at 10:30 pm #2001011ElvinStaffCustomer Support1. Thank you, how do I control the height size of this container? The video just expands like crazy on the homepage. I tried playing with the padding of the container but nothing responds to make it smaller. Thoughts? I shared the URL.
Consider adding
page-hero-wrapper
on your Container Element’s Additional CSS Class(es) text field on the Advanced tab.you then add this CSS:
.page-hero-wrapper { position: relative; }
This is so the video is bounded relative to the page-hero section only.
2. I’ve also kept my homepage content intact in order to show a button and headline. That is correct logic right? If I want to overlay content on the video?
Yes that should be fine.
November 11, 2021 at 10:56 pm #2001025AndyThank you so much Elvin, got it!
November 11, 2021 at 10:59 pm #2001027ElvinStaffCustomer SupportNo problem. Let us know if you need further help. 😀
-
AuthorPosts
- You must be logged in to reply to this topic.