What is CSS Anchor Positioning Generator?
CSS anchor positioning lets you tether one element to another using only CSS. You assign an anchor-name to the anchor element and use position-anchor on the positioned element. It eliminates the need for JavaScript positioning libraries for tooltips, dropdowns, and popovers. It is a new CSS feature supported in Chrome 125+.
Quick answer
Anchor positioning lets you attach an element to another element on the page using CSS alone, without JavaScript. It replaces most manual position calculations for tooltips, popovers, and dropdown menus.
Limitations
- Anchor positioning is only supported in Chrome 125+. Firefox and Safari do not yet support it as of early 2026.
- The anchor element must be a DOM ancestor or referenced by anchor-name. Elements in different shadow roots may not work.
- Fallback positioning with position-fallback is experimental and behavior varies across supported browsers.
How to use this tool
- Set an anchor name for the trigger element using the anchor-name property.
- Choose the positioning area for the anchored element relative to the trigger.
- The tool generates the CSS for both the anchor and the positioned element.
- Copy the CSS and pair it with your trigger and popover HTML.
What you can use it for
- Position a tooltip that follows a button or link.
- Create a dropdown menu aligned to its trigger element.
- Build a callout that points to a specific UI element on the page.