Webflow sync, pageviews & more.
NEW

How can I make the hero section in Webflow fill the browser viewport perfectly regardless of the height of the browser window?

TL;DR
  • Set the hero section's height to 100vh in the Style panel.
  • Remove top/bottom padding or margins from the hero and parent elements.
  • Ensure no parent containers restrict height; use auto or 100vh as needed.
  • Adjust for fixed/sticky navbars with top padding or position them outside the flow.
  • Test responsiveness across devices to account for mobile browser UI behavior.

To make the hero section fill the entire browser viewport height in Webflow, you need to use the correct height setting and ensure no other content interferes.

1. Set Section Height to 100vh

  • Select your hero section in the Webflow Designer.
  • In the Style panel, set the Height to 100vh (this stands for 100% of the viewport height).
  • This ensures the section always fills the full visible height of the browser window, regardless of device or screen size.

2. Remove or Reset Padding/Margins

  • Double check that the Body element or Page Wrapper doesn’t have unwanted padding or margin on the top or bottom.
  • Set top and bottom margin and padding of the hero section to 0 unless you intentionally want spacing.

3. Ensure No Parent Constraints

  • If your hero section is nested inside a parent container or div (e.g., a wrapper), make sure that parent is not restricting its height.
  • The parent should either have Height: auto or also be set to 100vh if you want it to fill the screen.

4. Adjust for Sticky Navbars or Fixed Elements

  • If you're using a fixed or sticky navbar, it may block part of the hero section.
  • You can:
  • Add top padding equal to the navbar height on the hero section.
  • Alternatively, place the navbar outside the flow (position: fixed) so it doesn't affect section flow, but then visually overlaps.

5. Test Across Viewports

  • Use Webflow’s responsive preview to test on different devices.
  • On mobile, some browsers adjust the viewport height with visible browser UI (like address bars). Using 100vh may display slightly more or less depending on browser behavior.

Summary

Set your hero section’s height to 100vh, ensure no conflicting padding/margins, account for fixed navbars, and test responsiveness to make it perfectly fill the screen on all browser heights.

Rate this answer

Other Webflow Questions