position-area
Newly availableSince 202688% of users
A newer, simplified way to position an element relative to its anchor. Instead of manually calculating top/left, you can use logical regions like 'top-right' or 'bottom-center'.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since January 2026. Widely available around July 2028.
The old way and the modern waySee the snippet: Dropdown width that matches its button →
Old way 8 lines
.select-menu {
position: absolute;
min-width: var(--button-width);
}
/* JS: measure the button and write its width */
const w = button.getBoundingClientRect().width;
menu.style.setProperty('--button-width', w + 'px');
/* then a ResizeObserver to redo it when the label or font changes */Modern 10 lines
.select-button {
anchor-name: --select;
}
.select-menu {
position: absolute;
position-anchor: --select;
position-area: bottom span-right;
min-width: anchor-size(width);
}
/* as wide as the button, no measuring */Newer parts of position-area
block-endBaseline Feb 2026block-startBaseline Feb 2026bottomBaseline Feb 2026position-area resolves margin: auto and inset: auto to 0Baseline Feb 2026endBaseline Feb 2026inline-endBaseline Feb 2026inline-startBaseline Feb 2026leftBaseline Feb 2026
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
none- Inherited
- No
- Applies to
- positioned elements with a default anchor element
- Animation type
- discrete
Quick example
.floating-menu {
position: absolute;
position-anchor: --menu-trigger;
/* Automatically places the menu at the bottom-center of the anchor */
position-area: bottom center;
}Values
noneposition-area browser support
BaselineNewly availableSince 2026 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.Works in all modern browsers. May need a fallback for older browsers.
Usage88%of people can use this12% use a browser without it.
Browsers
129+
147+
26+
129+Mobile
129+Android
147+Android
26+iOS
Interop 2026 focus area. All major browsers are actively working to fix cross-browser inconsistencies for this feature in 2026. Learn more →