Auto-margin works with absolute positioned elements | Stefan Judis Web Development
If you're defining absolute width or height for an absolute positioned element, you can use auto margin to lay out these elements.
https://www.joshwcomeau.com/css/center-a-div/
.box {
position: absolute;
inset: 0.5rem;
width: 7rem;
height: 7rem;
margin: auto;
}
July 15, 2024 at 10:51:44 AM EDT
*
FILLER