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.