Webflow background video not responsive

Hi there,

I am having a little issue with background video.
It seems the container of the video is responsive but not the video itself.
The container is being properly scaled on window resize but the video remains the same.
For the container, I have used the aspect ratio top-padding trick… (height/width*100%)

here is a quick video capture:

here is the live link:
https://background-video-83b877.webflow.io/

here is my read-only simplified link:
https://preview.webflow.com/preview/background-video-83b877?utm_source=background-video-83b877&preview=d86440793fa8f7df0b5101589e47ef38&mode=preview

My question:
Is there a way to fix it ? Is it possible the video itself scales with its container (since the container has exactly the same aspect ratio as the video)


Here is my site Read-Only: LINK
(how to share your site Read-Only link)

Try to add this custom code:

<style>
.wrap_gallery_img video {
    width: 100%;
}
</style>

Under the inspector looks like this code solve this issue.

Before

After

Selector

If you change .wrap_gallery_img class name in the future - remember to update the custom code.

2 Likes

Amazing !!

That totaly did the trick !
I should use the inspector more often.
Thank you so much :slight_smile:

1 Like