here's a non-flexbox solution, but the parent element has to have a set height:
.parent {
position: relative;
}
.child {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}