position-anchor

Specifies which defined anchor element a positioned element should track. It connects the positioned element to its anchor by name.

It is documented as part of the CSS Anchor Positioning specification.

/* Usage Example */
.tooltip {
  position: absolute;
  /* Links this tooltip to an element with 'anchor-name: --my-btn' */
  position-anchor: --my-btn;
  top: anchor(bottom);
}

/* Syntax */
position-anchor: auto;
position-anchor: none;

/* Global values */
position-anchor: inherit;
position-anchor: initial;
position-anchor: revert;
position-anchor: revert-layer;
position-anchor: unset;
Limited availability Since 2020 77% global usage

This feature is not Baseline because it does not work in some of the most widely-used browsers.

125+
125+
Interop 2026 focus area ? Learn more →
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC