Centering is one of the most difficult and common things to do for web developers.
Here are few ways to do it (from the most complicated to the simplest):
The Position Absolute method
transform: translate(-50%, -50%)
One of the old-school methods that we used before the existence of Flexbox.
The Table Cell method
In this method, table-cell together with vertical-align property are