CSS Position: Relative, Absolute, Fixed and Sticky Explained
A product badge appears in the corner of the page, a fixed button scrolls with a panel, or a sticky heading never sticks. These bugs often come from confusing three separate mechanisms: normal flow, the containing block that supplies coordinates, and stacking contexts. CSS positioning complements Grid and Flexbox rather than replacing them.