concept
static-position-rectangle — CSS reference
When both insets in an axis are auto, positioning can use a static-position rectangle derived from the box’s hypothetical placement in its layout context. Flex and grid have special rules; it is not simply a fixed offset of zero.
Formal Syntax & Structure
css syntaxcss
position: absolute; inset: auto;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>CSS positioning lab</title><style>body {margin:0} .sample {background:#dcebe9;color:#182e32}#p{width:240px;height:160px;background:#e6eef2} #a{width:60px;height:30px;background:#128579} #b{height:20px;background:#adcde8}#p{position:relative}#a{position:absolute;inset:auto}#b{height:40px}</style><body><div id="p"><div id="b">B</div><div id="a">A</div></div></body></html>