Last Updated: September 09, 2019
·
582
· razvanstan

Vertical align with 3 lines of CSS

With following lines of css, any container can be aligned vertically, without fixed height or position absolute.

position: relative;
top: 50%;
transform: translateY(-50%);