Centerig flexbox items

You can center a flexbox item vertically and horizontally by applying margin: auto; to it.

.parent { display: flex; }
.child { margin: auto; }