Hello! Hoping someone can help me with my video banner. I used the code below to add a video banner to my homepage along with overlaying text and the shop now button. It looks great on desktop but not on mobile. The video on mobile looks like it is zoomed in and not sized to fit. Also, is there a way to change the H2 font color to white but only for this section?
Trying to fix:
- The video looks great on desktop but not on mobile. The video on mobile looks like it is zoomed in and not sized to fit.
- I want to change the H2 font color to white but only for this section.
Thanks!
Here is the code I’m using for the video banner via custom liquid on the homepage:
{%- liquid
assign video_handle = ‘video url’
assign video_format = ‘mp4’
-%}
Here is the css code I added to the base.css for the text and shop button over the video banner:
}
.video-banner {
position: relative;
width: 100%;
height: 800px;
}
.video-banner video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.video-content {
position: absolute;
top: 80%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
color: #fff;
}

