CSSEasy
How do the position values differ?
By FrontendPro Editorial Team Updated 8/14/2026
#css#position#layout
Answer
static: default; ignorestop/left.relative: offset from its normal spot but keeps its space; establishes a containing block forabsolutechildren.absolute: out of flow, anchored to the nearest ancestor whosepositionisn'tstatic.fixed: anchored to the viewport (unless an ancestor hastransform/filter/will-change- then it anchors to that).sticky: behaves asrelativeuntil it hits a threshold; needs atop/bottomvalue and a parent withoutoverflow: hidden.
css
.header { position: sticky; top: 0; z-index: 10; }
