CSS positioning controls where an element appears on the page and how it behaves when the page scrolls or overlaps other elements.
By default, HTML elements follow normal document flow (top to bottom).
Positioning allows you to:
z-indexposition Property (Core Concept)position: static | relative | absolute | fixed | sticky;
Each value changes how top, right, bottom, left work.
position: static (Default)top, left, right, bottom ❌ do NOT workdiv {
position: static;
}
✅ Use case:
When you don’t want positioning behavior (most elements).
❌ Common mistake: