overflow
, transform
, will-change
, or similar styles from parent elements that create stacking contexts.position: relative
, position: sticky
with top: 0
, and assign a high z-index
(e.g., 9999).position: fixed
or use a scroll-triggered animation workaround.A sticky header z-index issue in Safari or iOS Safari that doesn’t occur in Chrome likely results from differences in how Safari renders position: sticky
with stacking contexts. Here's how to troubleshoot and resolve this in Webflow.
overflow
, transform
, or will-change
.overflow: hidden
or transform
set can create a new stacking context that traps the sticky element, causing it to appear below siblings or other elements unexpectedly.overflow: hidden
, overflow: scroll
, will-change
, transform
, filter
, or perspective
styles applied.z-index
works.Z-index: 9999
to ensure it stacks above other elements.position: sticky
, Safari may still misbehave unless the direct sticky element has a stacking context. To help:position: relative
explicitly to the sticky element.overflow: hidden
when possible.position: sticky
with top: 0
set.position: fixed
more consistently.Safari may mishandle z-index
of sticky elements if affected by stacking contexts created by parent styles like overflow: hidden
or transform
. Remove these properties from parents, assign an explicit high z-index to the sticky header, and set it as position: relative
with top: 0
. Switching to position: fixed
can also be a reliable fallback.