Normally the browser places elements one after another in the order they appear in your HTML. The position property lets you break out of that normal flow when you need to — pinning a header to the top of the screen, placing a badge on the corner of a card, or keeping a sidebar in view as the page scrolls. It is powerful, but it is also the source of many "why is this element in the wrong place?" moments.
This module starts with an overview of the five position values — static, relative, absolute, fixed, and sticky — and how each one decides where an element ends up. It then looks closely at sticky positioning, and finishes with z-index and stacking contexts, which control which overlapping element appears on top and explain why a huge z-index value sometimes still doesn't work.
Watch the lessons in order, then continue on to Flexbox.
Covers all of the CSS positions — static, relative, absolute, fixed, and sticky — and why positioning can be difficult to understand at first.
Shows how position: sticky fixes an element in place while the user scrolls, a common technique for headers and sidebars.
How z-index controls which elements appear on top, how it works with positioned elements, and the basics of stacking.
Why z-index is not a single global value: it is tied to a local stacking context, and understanding where contexts are created explains most z-index bugs.