How do I create a fixed div that stops scrolling in Webflow like the effect on my old site?

TL;DR
  • Set div to Fixed Position and parent to Relative Position with defined Height.
  • Adjust height or margins to control where the scrolling effect stops.

Creating a fixed div that stops scrolling to mimic a similar effect as seen on your old site involves specific steps:

1. Create a Fixed Element

  • Select the element you want to fix, or create a new Div Block for that purpose.
  • In the Style Panel, set the Position to Fixed.
  • Ensure it is fixed to one side of the viewport, such as the top or the left.

2. Implement the Scrolling Stop Effect

  • Create an empty Div Block or use an existing element within which the fixed div will scroll and stop.
  • Set this parent element's Position to Relative.
  • Define the Height of this parent element to control where scrolling stops.

3. Use Custom CSS for a Stopping Point

  • Set the Height of the Parent Element to be longer than the viewport if you want the fixed element to stay visible for a longer duration.

4. Test and Adjust

  • Preview the interaction to ensure the div scrolls and stops as desired.
  • Adjust the height or use Margins in the parent container to refine the stopping point.

Summary

Set your div block to Fixed Position to keep visibility and use a Relative Positioned Parent with a defined Height to control when the scrolling effect stops. Adjust as needed for desired effect duration.

Rate this answer

Other Webflow Questions