3 ms·
The responsive padding is a bit weird. Having different padding for top/bottom and left/right looks a bit weird. Also, for centering, I definitely prefer using
by rp1 5y ago
The responsive padding is a bit weird. Having different padding for top/bottom and left/right looks a bit weird.
Also, for centering, I definitely prefer using position: absolute and transform: translate(-50%, -50%)
- SahAssar 5y agoCentering 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.