Fixed positioning position: fixed
A fixed position element is positioned relative to the viewport, or the browser window itself, rather than the document.
This means it will stay in the same place even if the page is scrolled.

1

Absolute positioning position: absolute
Absolute positioning places an element relative to its nearest positioned div.

1
2

Sticky positioning position: sticky
Sticky positioning is a mix between relative and fixed positioning. An element is treated as relatively positioned until it crosses a specified threshold within the viewport (like scrolling to a certain point), at which point it becomes fixed.

1

Relative positioning position: relative
When you set an element’s position to relative, it allows you to position the element relative to its normal position in the document flow.

1
2