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 target div’s height to 100vh and width to 100% to ensure full screen coverage.  
  • Ensure all parent elements, including Body and any wrappers, have explicitly defined heights (100% or 100vh).  
  • Remove unwanted margins or padding, check for interfering Flex/Grid settings, and validate behavior in Preview and Responsive modes.

If a Webflow div set to 100% height is not filling the screen, it’s likely due to its parent element not having a defined height. Webflow uses a cascading box model, and `% height values require the parent to have an explicit height set. Here's how to fix it.

1. Set the Div's Parent Height to 100vh

  • Select the Body element and ensure its height is set to 100%.
  • Set the height of the parent wrapper (if any) to 100vh.
  • Avoid relying solely on 100% height unless the parent has a fixed or 100vh height. Otherwise, 100% has no reference point.

2. Use 100vh on the Target Div

  • Select the target div you want to fill the screen.
  • Set Width: 100%
  • Set Height: 100vh to make it extend the full viewport height — this is more reliable than 100%.

3. Remove Extra Spacing

  • Ensure the div and its parents have no margins or padding that could reduce dimensions.
  • Double-check Body and html styles under Elements panel or Style Manager — reset browser default user-agent styles if needed.

4. Check Display Settings

  • Ensure the div is not inside a Flex or Grid layout that's affecting sizing unexpectedly.
  • If using Flexbox, the parent might need to have:
  • Display: Flex
  • Direction: Vertical (Column)
  • Align: Stretch

5. Ensure Nesting Doesn’t Interfere

  • If the div is nested deep within multiple layers, repeat the height fix for intermediary containers — each parent in the hierarchy must have a height defined for 100% to work.

6. Preview and Test Responsiveness

  • Use Preview mode and Responsive Views in Webflow Designer to confirm behavior across breakpoints.
  • Sometimes, overflow or extra children elements may affect sizing — check for that.

Summary

Set your div's height to 100vh for full screen coverage, and make sure all parent containers have an explicitly defined height (typically 100% or 100vh). Avoid relying on 100% height alone unless the entire hierarchy above it supports that measurement.

Rate this answer

Other Webflow Questions