Absolute, Relative, Fixed and Sticky properties in CSS

By default position is static.

Static: No difference can be seen.

Relative: Relative to its normal position. If top, left are present then the div will move according to the top and left value from its normal position.

Absolute: The div will move with respect to its parent(parent can be its parent div and if not then body is the parent). Now div will not move with respect to its normal position.

Sticky: It means the div is fixed at a particular position even if we scroll. It will not leave its original position.

Fixed: It means div leaves its position and if another div is present next to it, that second div will take its position and the fixed div will come above the second div and is fixed at a particular position even if we scroll.