With just 3 lines of CSS (excluding vendor prefixes) we can with the help of transform: translateY vertically center whatever we want, even if we don’t know its height. The CSS property transform is usally used for rotating and scaling elements, but with its translateY function we can now vertically align elements. Usually this must be done with absolute positioning or setting line-heights, but t
![Z63 | Vertical align anything with just 3 lines of CSS | zerosixthree](https://cdn-ak-scissors.b.st-hatena.com/image/square/510cb8583c0dcaff265d275849d67ca860be1ebb/height=288;version=1;width=512/http%3A%2F%2Fzerosixthree.se%2Fwp-content%2Fuploads%2F2014%2F01%2Flogo-large.png)