1. absolute positioning , 50% each from the upper left (this time will be biased, since the element itself has a certain width and height), disposed translate each -50% (in the horizontal direction, the vertical direction)
position: absolute; top:50%; left:50%; transform: translate(-50%,-50%)