Webflow sync, pageviews & more.
NEW

How can I create a dropdown that pushes other elements down the page like the one shown in this Webflow gif?

TL;DR
  • Build a custom div-based accordion with a toggle button and hidden content set to height 0px and overflow hidden.
  • Use click interactions to animate the content div’s height from 0 to auto and back, and ensure the layout uses normal flow (no absolute positioning) so the dropdown pushes content below.

You’re looking to create a dropdown (or accordion-style) interaction in Webflow that, when clicked, expands downward and pushes other elements below it instead of overlapping them.

1. Use Native Webflow Dropdown or Custom Div Structure

  • Option 1: Native Dropdown Component

  • Drag in a Dropdown from the Add panel (Components section).

  • This component automatically manages open/close states, but be aware: it is designed primarily for overlays (e.g., nav menus), and by default it overlays content instead of pushing it.

  • You’ll need to modify its behavior by adjusting height/visibility with interactions (see Step 3).

  • Option 2: Custom Div-Based Accordion

  • Create your own structure using Div Blocks:

    • Toggle Button Div (e.g., header)
    • Content Area Div (the part to reveal/hide)

2. Set Display Styles for Smooth Expansion

  • Set the Content Area Div to:
  • Display: Block
  • Height: 0px
  • Overflow: Hidden
  • This setup ensures the content is hidden but not absolutely positioned, so the rest of the layout can flow/push accordingly.

3. Add Click Interaction to Animate Height

  • Select the Toggle Button Div and go to Interactions panel.
  • Create an On Click Trigger and set it to affect the Content Area Div.
  • Add two actions:
  • First Click: Animate the Content Area height from 0px to a value that fits your content (e.g., auto using "Size > Height" and setting it to auto via "Step").
  • Second Click: Animate the height back to 0px to collapse.
  • Use Ease In-Out and Duration ~0.3–0.5s for smooth transitions.

4. Make Sure Your Layout Uses Normal Flow

  • Ensure that your page layout uses Static or Relative positioning and standard block flow (no Absolute or Fixed positioning on parent containers), so expanding divs push others below them.
  • Avoid using position: absolute on the dropdown or container—this will cause content to overlap.

5. Optionally Add "Open" Class via Interaction

  • If you need styling changes (like arrow rotation), use "Add Class" / "Remove Class" in the interaction on toggle to reflect open/collapse states.

Summary

To create a dropdown that pushes other content down in Webflow, build a custom div-based accordion with hidden content (height: 0px, overflow: hidden), then use click interactions to animate its height between 0 and auto. Ensure your layout uses normal flow positioning so expanding elements push content rather than overlap it.

Rate this answer

Other Webflow Questions