CSS position-area Property
The position-area property places an anchor-positioned element in a 3x3 grid around its anchor, such as top center or bottom span-right.
Description
The position-area property places an anchor-positioned element in one of the cells of an imaginary 3×3 grid built around its anchor. The middle cell is the anchor itself and the outer rows and columns extend to the edges of the containing block. Instead of writing top: anchor(bottom); left: anchor(center), you can write position-area: bottom.
A value names a row and a column, using physical keywords (top, bottom, left, right, center), logical keywords (block-start, inline-end, start, end) or the span-* keywords that cover two cells, for example top span-right or bottom span-all. One keyword sets one axis and the other axis defaults to spanning all cells or to center.
The positioned element is laid out inside the chosen area, and its default alignment changes to sit against the anchor, so no extra offsets are needed. It needs a default anchor, set with position-anchor or an implicit anchor, and only affects absolutely or fixed positioned elements. Combine it with position-try-fallbacks to flip to another area when there is not enough room.
Definition
- Initial value
- none
- Applies to
- positioned elements with a default anchor box
- Inherited
- no
- Computed value
- the keyword none or a pair of keywords
- Animatable
- discrete
- JavaScript syntax
- object.style.positionArea
Interactive Demo
Syntax
position-area: none | [ [ left | center | right | span-left | span-right | x-start | x-end | span-x-start | span-x-end | self-x-start | self-x-end | span-all ] || [ top | center | bottom | span-top | span-bottom | y-start | y-end | span-y-start | span-y-end | self-y-start | self-y-end | span-all ] ] | [ block-start | center | block-end | span-block-start | span-block-end | span-all ] || [ inline-start | center | inline-end | span-inline-start | span-inline-end | span-all ] | [ start | center | end | span-start | span-end | span-all ]{1,2};Values
- noneThe default. No position area is used.
- top, bottom, left, right, centerPhysical rows and columns of the grid around the anchor.
topis the row above the anchor,centerthe row or column of the anchor itself. - span-top, span-bottom, span-left, span-rightCovers the center cell plus the named neighbouring cell, so the element can overlap the anchor and extend to one side.
- span-allCovers all three cells of that axis.
- block-start, block-end, inline-start, inline-end, start, endLogical equivalents that follow the writing mode.
- self-x-start, self-y-end ...Logical keywords resolved against the positioned element's own writing mode.
- initialSets the property to its initial value.
- inheritTakes the computed value of the parent element.
Example
Browser Support
The following information will show you the current browser support for the CSS position-area property. Hover over a browser icon to see the version that first introduced support for this CSS property.
Desktop





Tablets & Mobile





