3 ms·
Centering with position absolute does not work well if the content can be wider/higher than the container (like responsive layouts or if the content is unknown)
by SahAssar 5y ago
Centering with position absolute does not work well if the content can be wider/higher than the container (like responsive layouts or if the content is unknown).
Using grid/flexbox fixes that and other corner-cases.