How can I create a div at 100% width and height on Webflow without needing to use Javascript?

Published on
September 22, 2023

To create a div at 100% width and height on Webflow without needing to use Javascript, you can utilize Webflow's built-in capabilities and CSS techniques. Here's how you can achieve this:

  1. Create a new section element in your Webflow project by dragging and dropping the Section element from the Add Panel onto your canvas.
  2. With the newly created section selected, go to the Styles tab in the right sidebar.
  3. Set the section's height to 100vh, which stands for viewport height. This ensures that the section takes up the full height of the browser window.
  4. Set the section's width to 100% using the width property.
  5. By default, the section will have some padding. If you want the div to truly occupy the full width and height without any gaps, you can set the section's padding to 0 on all sides.
  6. If you want the div to cover the entire viewport regardless of its contents, you can set the section's position to absolute. However, if you want the div to expand based on its content, you can leave the position as static.
  7. Customize the styling of the div within the section to meet your design requirements using the built-in Webflow options or custom CSS.

By following these steps, you can create a div at 100% width and height without needing to use Javascript in Webflow.

Example CSS

section {  height: 100vh;  width: 100%;  padding: 0;}

Additional Questions:

  1. How do I create a full-width background in Webflow?
  2. How can I make a div take up the full height of the browser window in Webflow?
  3. What is the difference between 100% width and 100vw in Webflow?