top
, right
, bottom
, and left
.This value creates a new stacking context when the value of z-index
is not auto
.transform
, perspective
, or filter
property set to something other than none
(see the CSS Transforms Spec), in which case that ancestor behaves as the containing block. (Note that there are browser inconsistencies with perspective
and filter
contributing to containing block formation.) Its final position is determined by the values of top
, right
, bottom
, and left
.This value always creates a new stacking context. In printed documents, the element is placed in the same position on every page.top
, right
, bottom
, and left
. The offset does not affect the position of any other elements.This value always creates a new stacking context. Note that a sticky element “sticks” to its nearest ancestor that has a “scrolling mechanism” (created when overflow
is hidden
, scroll
, auto
, or overlay
), even if that ancestor isn’t the nearest actually scrolling ancestor.