07 - CSS Anchor Positioning: Tooltips and Dropdowns Without JavaScript
The CSS Anchor Positioning API — 78% browser support since January 2026 — lets you attach an element to another as an anchor without a single line of
The CSS Anchor Positioning API — 78% browser support since January 2026 — lets you attach an element to another as an anchor without a single line of JavaScript: no more fragile offset calculations, no ResizeObserver, just declarative CSS.
What you'll learn
- I concetti fondamentali di CSS Anchor Positioning: anchor, positioned element
- Le proprieta anchor-name e position-anchor
- La funzione anchor() per il posizionamento relativo
- Come implementare tooltip, dropdown e context menu in CSS puro
- I fallback automatici con position-try-fallbacks
This article is part of the Core Web Vitals series on federicocalo.dev.
Read the full article
The complete article (11 min read) with code examples, diagrams, and practical exercises is available here:
➡️ 07 - CSS Anchor Positioning: Tooltips and Dropdowns Without JavaScript
https://federicocalo.dev/en/blog/css-anchor-positioning-tooltip-dropdown
By Federico Calò — Software Developer & Technical Writer