What is the default body dimension in Webflow? And how can I set margins on the sides of my divs instead of having them span the entire window?

Published on
September 22, 2023

The default body dimension in Webflow is set to 100% width and height, which means it spans the entire viewport of the browser. This allows the content of the website to fill the entire screen by default.

To set margins on the sides of your divs instead of having them span the entire window, you can use the following steps:

  1. Select the div or element that you want to set margins on.
  2. In the Style panel, click on the Layout tab.
  3. Scroll down to the "Position" section and click on the dropdown menu next to "Position."
  4. Select "Relative" from the options. This will enable you to set margins on the element.
  5. Once you have selected "Relative," you can now set margins on the sides of the div by adjusting the values in the "Left Margin," "Right Margin," "Top Margin," and "Bottom Margin" fields in the Margin category of the Style panel.

By setting the position of the div to "Relative," you are allowing the div to have its own dimensions and position within the containing parent element. This means that you can adjust the margins on all sides of the div individually, giving you control over how much space it takes up on the page.

It's important to note that by default, divs in Webflow are set to "Block" display mode, which means they will automatically have 100% width. If you want to have more control over the dimensions of your divs, you can change the display mode to "Inline-Block" or "Flex" in the Display category of the Style panel.

Using these steps, you can easily set margins on the sides of your divs instead of having them span the entire window, allowing for more flexibility in your web design.

Additional Questions:

  1. How do I adjust the width of a div in Webflow?
  2. Can I set different margins for different sides of a div in Webflow?
  3. What is the difference between "Relative" and "Absolute" positioning in Webflow?