CSS Anchor Positioning Playground

Grandma Marni’s price tag tethered to her orange crate: write anchor-name, position-anchor and position-area, drag the crate, and the browser places the tag…

Why it matters

Tooltips, dropdowns, menus and popovers are in every app, and placing them used to need JS (or Popper/Floating UI): measure the button, work out coordinates, redo it on every scroll and resize, plus flip logic. Anchor positioning replaces that with a few lines of CSS.

The key idea

Tied by name, not by where it sits in the DOM

Common mistakes

Try it in this playground