Site logo

Archived topic

Adding background video to a container in a grid

7 replies · Started by Cleo on August 11, 2022

Viewing posts 1–8 of 8

[plugins installed: GeneratePress Premium, GenerateBlocks, GenerateBlocks Pro]

I am creating an image grid where each block has a title centered on top. I'm using Grid and adding a full background image to each container then adding headline to each container and adjusting its location (to center the title) using spacing.

I would like one of the grid containers to autoplay a video in the background instead of a static image. In other words, all grid containers will contain full images with headlines centered on top of them, but one will be playing auto-playing a video.

I don't see a way to add a background video to a container - only Image URL, and Advanced (maybe this is the key but I might need documentation for this).

I'm able to add a video to a container and have it autoplay (provided muted is on), but I'm not sure how to overlay a headline. You do this with the Hero Element. Maybe there's a way to do a grid in Hero Elements?

Below is an example of the list view for a one-square grid.

> Grid
> Container
> Headline (obviously this just sits above the video, but maybe there's CSS I can add to move it on top of the video)
> Container
> Video

Thanks!

My indentation didn't come across in the List view example. Should have used code formatting:

> grid
     > container
        > headline
        > container
           > video

That worked. You guys are amazing!

Glad we could be of help!

I have tried this and cannot get it to work. The video background is a url from vimeo. Any help is greatly appreciated. It is currently on this page: https://gc.fresheggs.biz/

Hi Holly,

The video link has to be the link to the video file, something ended with .mp4or .mov for example.

This archived topic is closed to new replies.