Yet Another Way to Center an (Absolute) Element
SMRTR summary
CSS now supports centering absolutely positioned elements using align-self and justify-self properties instead of the traditional transform translate method. The key is setting inset: 0 to make the Inset-Modified Containing Block match the containing block size, then using place-self: center. This three-line approach works across all browsers and supports all alignment positions.
SMRTR provides this summary for quick context. The original article belongs to CSS-Tricks.
Read the original article