Background Video covers multiple sections

Background Video covers multiple sections

I created a page with multiple sections. On the top section (my hero section) i want a video background.
On the second section I want a black background (without video) but the video selected in the first section wil cover all the section afterwards.

  1. Add a section
  2. Add a background video
  3. set the hight of section 1 to 600px
  4. Add multiple sections below the first one
  5. Add some random content
  6. View the result

Backend view:

Frontend view:

Environment info

  • WordPress version: 6.2.2
  • Cwicly Plugin version: 1.2.9.7.3

Hi @Lijn-B,

I recommend setting overflow: hidden on your hero section, that should achieve what you want.

Hi @StrangeTech,

Thanks for your reply,
Unfortunately it doesn’t solve the problem.

@Lijn-B, please set position: relative; on your hero.

2 Likes

Try adding position relative to the hero section (the one you have the background video set on). You normally don’t have to do that, but it will rule it out if it’s still overflowing. Without being able to inspect the site, it’s hard to tell what’s happening.

On another note, I would advise against setting hard pixel values for height in most cases, and let the content and padding adjust the height for you. If you must set a manual height, set it using the VH unit in the min-height field. This will allow things to stay fluid, where a fixed pixel value is really hard to control for section height in a responsive environment. For example, the content will start wrapping and stacking as the screen width shrinks and can easily overflow the container if you’re not careful. It’s also not future proof when you need to add or change content in the future. Just FYI.

2 Likes

Yes thanks that did the trick!!