Can I build a webapp with a 100% height using relative position instead of absolute position in Webflow?

Published on
September 22, 2023

Yes, you can build a web app with a 100% height using relative position instead of absolute position in Webflow. Here's how you can achieve this:

  1. Set the body element height: Start by setting the height of the body element to 100% so that it takes up the full height of the viewport. To do this, select the body element in the Navigator panel, go to the Style tab on the right sidebar, click on the "+" icon next to the Height property, and select "Percent". Then, enter "100" in the input field.

  2. Position elements relatively: Next, you'll need to position your app's container elements relatively. Select the container element you want to be 100% height, go to the Style tab, click on the Position property, and select "Relative". This will allow the element to be positioned relative to its normal position on the page.

  3. Set height to 100%: Now that your container element is positioned relatively, you can set its height to 100%. With the container element selected, click on the "+" icon next to the Height property, select "Percent", and enter "100" in the input field.

  4. Adjust parent elements: If your container element is nested within other elements, such as a section or a div, make sure to adjust their height as well. Follow the same steps mentioned above to set their height to 100% to ensure that your app's layout remains consistent.

By using relative position and setting the height to 100% for your container elements, you can achieve a web app with full height in Webflow without relying on absolute positioning. This approach provides more flexibility in terms of how elements flow on the page and is generally considered a best practice for building responsive layouts.

Additional Questions:

  1. How do I set the height of the body element to 100% in Webflow?
  2. Can I use relative positioning to create a full-height sidebar in Webflow?
  3. What are the advantages of using relative position instead of absolute position for creating a web app layout in Webflow?