To render a background video in Webflow without cropping, you need to strategically use layout and sizing settings to maintain the video's aspect ratio while covering the intended area.
1. Understand How Webflow Handles Background Videos
- Webflow uses the object-fit: cover style on background videos by default.
- This causes the video to scale and fill its container, which leads to cropping if the container’s aspect ratio differs from the video.
2. Use a Video Element Instead of Background Video Component
- Background video components are intended for full sections and will crop to cover.
- Use a regular Video element (Embed or YouTube/Vimeo component) if you want full control over size and aspect ratio.
3. If Using Background Video Component, Adjust Container Settings
- Set the container's position to relative.
- Use the background video component inside an absolutely positioned div that fills the parent.
- Ensure the div has 100% width and 100% height and uses object-fit: contain (via custom CSS) instead of cover to prevent cropping.
4. Apply Custom CSS via Embed
- Add an Embed element anywhere in the page and include this line inside
<style>
tags: video { object-fit: contain !important; }
- This overrides Webflow’s default crop behavior and fits the full video within the container.
5. Use a Fixed Aspect Ratio Wrapper
- Wrap the video in a div block with a fixed aspect ratio, such as 16:9, using padding:
- Set the wrapper div to
position: relative
, width: 100%
, and padding-top: 56.25%
(for 16:9). - Set the video inside to
position: absolute
, top: 0
, left: 0
, width: 100%
, height: 100%
, and object-fit: contain
.
6. Optimize Video File Dimensions
- Use a video that is already matched to the aspect ratio of the container where it will render.
- Avoid ultra-wide or vertical formats unless specifically needed, as those will always get cropped in unconventional layouts.
Summary
To prevent cropping, either avoid using the background video component or override the default object-fit behavior using custom CSS. Wrapping the video in a fixed aspect ratio container is the most reliable method to maintain the full video frame.