Static Position
By default, all elements have static positioning. They flow naturally in the document.
Relative Position
Relative elements can be moved using top
, left
, etc., without affecting other elements.
Absolute Position
Absolute elements are positioned relative to their nearest positioned ancestor.
Fixed Position
Fixed elements stay in place relative to the viewport even when scrolling.
Sticky Position
Sticky elements act like relative until a scroll threshold is met, then they stick like fixed.