When using position: sticky and position: relative in Webflow, some users experience issues in Safari, where sections incorrectly pass under or ignore the sticky behavior. This is due to Safari’s stricter handling of layout structure.
1. Understand Safari's Sticky Behavior Limits
- Safari requires that all parent containers of a sticky element have a defined height and are not set to overflow: hidden.
- If any parent has overflow: hidden, scroll, or auto, it can break sticky positioning.
- Sticky elements must not be inside elements using transform, filter, or perspective — these also create new stacking contexts that block stickiness.
2. Check Parent Elements
- Go through all parent elements of your sticky element in the Webflow Navigator.
- Ensure none of the parents have
overflow: hidden
, auto
, or scroll
. - If the sticky element is inside a Section or Div Block, make sure those containers have a defined height if needed.
- Select each parent of the sticky element and check for 2D/3D transforms (like move, rotate, scale) in Webflow’s Style panel.
- If any are applied (even unintentionally), remove them. These break
position: sticky
in Safari.
4. Set Sticky Element's Container Height
- Safari needs a reference point to correctly limit the sticky offset. Set a height or min-height on the sticky element’s container (e.g., its parent section).
- Example: If the sticky element is a sidebar inside a two-column layout, the container Div of the whole layout should have a height value or min-height.
5. Use Top
with Sticky
- Ensure you've applied a
top
value (e.g., top: 0px
) to the sticky element in Webflow. Without it, sticky won’t function. - Also ensure the sticky element itself is not set to display: inline — use block or flex.
6. Test with Simplified Structure
- If you're unsure where the issue lies, create a simple test page in Webflow with a sticky element.
- Gradually add complexity from your main project to pinpoint where the sticky behavior breaks.
Summary
To fix Safari issues with position: sticky in Webflow, make sure parent elements don’t use transforms or overflow, define container heights, and apply a valid top
value to the sticky element. Safari is stricter than other browsers, so your layout structure must be clean and well-defined.