How do I set an aspect ratio in Webflow?
Set a Webflow aspect ratio in Size so a video frame or image keeps its shape when the window changes.
Select the element and open Style panel, Size, then set Aspect ratio. Presets include Widescreen 16:9, Square 1:1, and Custom. A ratio sets the free side from the side you already sized. If both width and height are set, those values win and the ratio does not replace them. Set Overflow to hidden. On a phone breakpoint, change the ratio if the shape no longer fits.
Set the ratio in Size
Aspect ratio keeps an element in a shape while the window changes. Select the element and open Style panel, Size. That section is where width, height, aspect ratio, overflow, and fit live. Some size settings are disabled on a container, so if the ratio control is missing, set it on the element inside the container.
Name a class before you change the second frame. The ratio is stored on the class. The next element that uses the class gets the same shape.
Webflow's presets are:
- Auto, which does not constrain the box
- Anamorphic (2.39:1)
- Univisium/Netflix (2:1)
- Widescreen (16:9)
- Landscape (3:2)
- Portrait (2:3)
- Square (1:1)
- Custom, with your own width and height values
Example: a case-study frame should stay 16:9. Select the frame, set Aspect ratio to Widescreen (16:9), and set the width to 100 percent of the parent. Leave the height unset so the ratio can supply it.
Width and height by themselves are a different control. The width and height guide is those numbers, including min and max. This page is the ratio that ties a shape together.
Leave one side for the ratio to set
The ratio respects sizes you already set. Webflow's example is an image with a height of 200px. After a ratio is applied, the width becomes 150px. The height you set stays, and the ratio fills in the other side.
If you set both width and height, and then apply a ratio, those two values take precedence. The ratio does not override them. That is why a frame can look unchanged after you pick 16:9. Clear the fixed height, keep the width, and let the ratio set the height.
Auto is the preset that removes the constraint. Use it when the content should decide the height again, such as a card whose quote can run long.
Keep the shape when content is taller
A ratio does not crop by itself. If the content is taller than the shape, it can spill out. Webflow says to set Overflow to hidden when the element should keep the ratio no matter what is inside. Select the frame, stay in Size, and set Overflow to hidden.
For an image that already has its own proportions, set Fit to cover so the photo scales inside the ratio. The fit guide is fill, contain, cover, none, and scale down. Cover is the option Webflow names for this case. The parent still needs a size for fit to work. The ratio can be that size.
A YouTube element already keeps the video's ratio and takes the full width of its parent. You do not add this control to that element to get 16:9. The YouTube guide is that player. Use Aspect ratio when a div or an image should hold a shape you pick, such as a still frame above a caption.
Change the ratio on a smaller screen
A ratio that looks right on a wide screen can feel too short or too tall on a phone. Webflow says elements sized with a ratio may look different on mobile portrait, because the screen width may not match the proportional height. Change the ratio, or the other size settings, on that breakpoint.
Their example is a widescreen ratio on larger breakpoints and a square ratio on mobile. Select the phone breakpoint in the canvas bar, select the frame, and set Aspect ratio to Square (1:1). The desktop breakpoint can keep Widescreen (16:9). Check the canvas at both widths before you publish.
Custom is the preset when none of the named shapes match. Enter the two numbers, such as 4 and 5 for a poster, and preview the frame with a real image in it. A custom pair that is very tall will push the next section down on a phone. Square or a shorter custom pair is often the phone override.
Publish and measure the frame
Preview the page at desktop and at phone width. The 16:9 frame should stay 16:9 when you resize the desktop window, and it should use the phone ratio you set on that breakpoint. If the height stays a fixed pixel value, clear that height and confirm the ratio is still Widescreen or Square on the breakpoint you are viewing.
Overflow hidden should clip the extra image, not the caption under the frame. If the caption disappears, it is inside the frame. Move it outside the element that has the ratio.
Then publish and open the live page. Resize the browser once. A frame that is correct in the Designer and square on the live phone is usually a ratio set on the wrong breakpoint, or a height that is still locked. Fix that value, publish again, and check both widths on the live URL.
Setting a ratio on a page you already have is ordinary layout work on an existing site. The membership is one plan for every existing Webflow site: $999 per month, including 10 hours of Webflow work. Additional work is $75 per hour and starts only after you approve a written estimate.
Questions & answers
I set width and height, then the ratio, and nothing changed. Why?
Webflow says predefined width and height take precedence over the ratio. Clear one of them, often the height, and leave the ratio to set that side.
The photo inside the frame is cropped. Which fit should I use?
Set Fit to cover when the image already has its own proportions and you want it to fill the ratio. The fit guide covers fill, contain, and the other options.
Does the YouTube element need this ratio?
No. The YouTube element already keeps the video ratio and takes the full width of its parent. Use Aspect ratio on a div, an image, or another element that should hold a shape you choose.
The ratio control is missing on my container. Where do I set it?
Some size settings are disabled on a container. Set the ratio on the element inside the container, such as the video frame, instead of on the container itself.
Sources & further reading
Need a hand with your Webflow site?
View membership
View membership