CSS Absolute Position
Learn absolute positioning, how parent-child positioning works, and common mistakes beginners make.
David Miller
January 1, 2026
2.7k60
Absolute positioning removes element from normal flow.
## Important rule
Absolute positions **relative to nearest positioned parent**.
## Example
```css
.parent {
position: relative;
}
.child {
position: absolute;
top: 10px;
right: 10px;
}
```
## UI imagination
Badge on corner of card.
## Real-world example
- Notification badges
- Close buttons
- Icons inside cards
## Common mistake
Forgetting to set parent position.
#CSS#Beginner