DEV Community

loading...

Discussion on: Centering in modern CSS

Collapse
adamwojnicki profile image
Adam Wojnicki

In the first example I'd pick flex. In case somebody expects IE compatibility.

Collapse
mr_eis profile image
Marius Eisenbraun Author

In general, both display types result in the same rendering.

If compatibility is needed, flexbox is maybe the better solution.
IE11 supports grid too, but has many bugs. So I'm not sure without testing, if this solution would work as expected.