Webflow sync, pageviews & more.
NEW

How can I create a sticky footer in Webflow without having to use excessively large top margins?

TL;DR
  • Set a 100vh Flexbox page wrapper with column direction and space-between alignment.
  • Assign flex: 1 to the main content to push the footer to the bottom on short pages without using large margins.

To create a sticky footer in Webflow without relying on large top margins (which can break responsiveness), use Flexbox on the page wrapper to naturally push the footer to the bottom of the viewport on short pages.

1. Set the Body or Main Wrapper to 100% Height

  • Select the Body tag or a dedicated page wrapper (e.g., a div called Page Wrapper).
  • In the Style panel, set Height: 100vh or Min Height: 100vh (100% of the viewport height).
  • Set Display: Flex and Flex Direction: Column.
  • Use Justify: Space Between to push the main content and footer apart.

2. Structure Your Page Correctly

  • Place the following elements inside your Page Wrapper or body:
  • Header (optional)
  • Main Content Section
  • Footer
  • The important structure is:
  • Wrapper (100vh, Flex Column, Space Between)
    • Content (can grow)
    • Footer (pushes to bottom if content is short)

3. Allow Content Section to Grow

  • Select your main content section (e.g., Main or a specific div).
  • Set Flex: 1 under the Sizing panel so it stretches to fill available space when the content is short.
  • Keep the Footer styled as needed (e.g., background, padding, text).
  • It will stay at the bottom of the viewport on short pages, and naturally below content on longer pages.

Summary

Use Flexbox on a 100vh page wrapper with column direction and space-between alignment to push the footer to the bottom. Assign flex: 1 to the main content to fill space above the footer, eliminating the need for large margins.

Rate this answer

Other Webflow Questions