position |
static |
Default value. Element is positioned according to the normal flow of the document. |
relative |
Element is positioned relative to its normal position. Use top, right, bottom, left to move it. |
absolute |
Element is positioned relative to its nearest positioned ancestor (not static). Removed from normal flow. |
fixed |
Element is positioned relative to the browser window. Stays in place when scrolling. |
sticky |
Element toggles between relative and fixed, depending on scroll position. |
top, right, bottom, left |
<length> | <percentage> | auto |
Offsets the element from the respective edge of its containing block, when position is not static. |
auto |
Default. The browser calculates the position. |
0, 10px, 5%, etc. |
Specifies the offset distance from the edge. |
inherit |
Inherits the value from its parent element. |
z-index |
<integer> |
Controls the stacking order of positioned elements (those with position other than static). |