Centering in CSS: A Complete Guide From CSS-Tricks. How to center horizontally, vertically and both. source