SMRTR ProgrammingMar 1, 2026CSS-Tricks

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
SMRTR Programming

Get the next batch of curated summaries in your inbox.

This archive is built from SMRTR newsletter summaries. Subscribe for hand-picked stories without the extra noise.