coderef

Sticky positioningBaseline · Widely available

The position: sticky CSS declaration positions an element in the normal flow until it crosses a specified threshold, at which points it becomes fixed (stuck) at that position.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 19, 2019. Widely available since Mar 19, 2022.

Browser support

DesktopChrome
1–55Not supported
56+Supportedsince Jan 25, 2017
Current: 155
Edge
12–15Not supported
16+Supportedsince Oct 17, 2017
Current: 154
Firefox
1–58Not supported
59+Supportedsince Mar 13, 2018
Current: 157
Safari
1–12.1Not supported
13+Supportedsince Sep 19, 2019
Current: 27
MobileChrome Android
18–55Not supported
56+Supportedsince Feb 1, 2017
Current: 155
Firefox Android
4–58Not supported
59+Supportedsince Mar 13, 2018
Current: 157
Safari iOS
1–12.2Not supported
13+Supportedsince Sep 19, 2019
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN — see the links below.

Feature detection

CSS · check before using
@supports (position: initial) {
  /* styles that rely on position */
}

/* or in JavaScript */
if (CSS.supports("position", "initial")) {
  // use it
}

Sub-features

Support for each part of the feature (2). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
position.position_sticky_table_elements561659856598
position.sticky56163213563213