Definition:
The CSS position property is used to set the position of an element by using the following five position values
- absolute
- fixed
- static
- sticky
- relative
Syntax:
position: absolute;
position: fixed;
position: static;
position: sticky;
position: relative;
Click on each below link to understand in details.
CSS Position Values | Description |
1. absolute | it is positioned relative to the closest parent |
2. fixed | it is positioned in a fixed position. |
3. static | it is a default position and always positioned with the flow of your pages |
4. sticky | it floats an element with the user’s scroll |
5. relative | it is positioned relative to its normal position |
You may be interested in the following topics:
- CSS Position relative
- CSS Position sticky
- CSS Position static
- CSS Position fixed
- CSS Position absolute
- CSS Position (All Properties)