Automatically fit section (or any other element) to its content

Hey there,
I’ve been playing around to learn the stuff Webflow offers, and built a hypothetical website that you can see here:

I set the Hero section to be 100 VH which works well on all devices.

However, for the second section (with the ‘OH SO ORIGINAL’ Lorem Ipsum headline) i don’t want to take the full height of the screen. In Desktop mode, i set it to 500 px and it’s OK. The problem is that when i switch through devices the proportions between the section size and it’s content is changing and doesn’t look good. The worst case being on mobile where it’s totally messed up.

I’ve tried using VH and % but didn’t get it to work.
I don’t want to manually set the size for each device, but rather let the section height to fit automatically to its content. I don’t want it to be fixed size… but content related.
Is there a way to do it, without coding, just with Webflow capabilities?


Hello @Orimanor, sorry for delay reply :confused:

You can just set height of the section to “auto”

1 Like

Thanks @sabanna :smile:

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.