Key ideas at a glance
A quick review of the concepts that matter most in modern positioning work.
Positioning as a system
Modern CSS positioning is most useful when you think in terms of references, layers and interaction instead of isolated properties.
The `inset` shorthand
`inset` compresses `top`, `right`, `bottom` and `left` into one readable declaration.
`sticky` as a hybrid
`sticky` starts in the flow and then locks itself in place when a scroll threshold is reached.
Centering with `inset`
With known dimensions, `inset: 0` plus `margin: auto` can center an absolutely positioned box cleanly.
Stacking contexts matter
Positioning is not only about movement. It also affects how layers compete visually.
Readable modern syntax
Modern positioning code is often shorter and easier to reason about than older combinations of offsets and transforms.