#14 Position Property in CSS

Опубликовано: 19 Июнь 2026
на канале: Happiee Codes
19
5

`position: static`: Default positioning where the element is placed according to the normal flow of the document.

`position: relative`: Positions the element relative to its normal position, allowing adjustments using `top`, `left`, `right`, or `bottom`.

`position: absolute`: Positions the element relative to the nearest positioned ancestor (not the document), and it can be moved with `top`, `left`, `right`, or `bottom`.

`position: fixed`: Positions the element relative to the viewport, so it stays in the same place even when the page is scrolled.

`position: sticky`: Switches between relative and fixed positioning depending on the user's scroll position (sticks to the viewport when scrolled to a certain point).