Webflow sync, pageviews & more.
NEW

How can I make a div in Webflow fill the entire screen vertically and horizontally, including when using a height of 100% that is not working? I have already tried removing margins and padding with no success. Thank you for your assistance.

TL;DR
  • Set the div’s height to 100vh and width to 100% to ensure full-screen coverage regardless of parent styles.
  • Make sure the Body (and implicitly HTML) has height set to 100%, and confirm parent display and overflow settings don’t restrict the div.

If your div is not filling the entire screen despite using height: 100%, the issue usually stems from the div’s parent elements not having defined heights.

1. Use 100vh Instead of 100%

  • 100% height only works if the parent has an explicit height.
  • 100vh (100% of the viewport height) ensures the div fills the screen vertically regardless of parent styles.
  • Set your div’s Height to 100vh and Width to 100% in the Style panel.

2. Set Body and HTML Heights (Optional but Helpful)

  • In Webflow, ensure the Body element and the HTML/root element are set to Height: 100%.
  • Select the Body in the Navigator, then set its Height to 100%.
  • Webflow doesn’t expose the HTML element directly, but setting the Body to 100% usually cascades as expected.

3. Set Display Settings

  • Set your target div to Display: Block (default) or Flex if you're using layout controls.
  • If it’s in a container or section that uses Flex, confirm that the parent’s size and alignment settings don’t restrict the child’s size.

4. Remove Other Constraints

  • Confirm there are no parent padding/margin/overflow that would prevent full coverage.
  • Make sure no parent element has overflow: hidden that might clip the div.

5. Use Min-Height (if dynamic content)

  • If you expect content to push beyond the viewport, use min-height: 100vh instead of height, which allows it to grow with content.

Summary

To make a div cover the entire screen in Webflow, set its Height to 100vh and Width to 100%, and ensure its parent elements (like Body) are also set to 100% height. Avoid relying solely on height: 100% unless the entire parent chain has defined heights.

Rate this answer

Other Webflow Questions