.container{
 height: 100%;
 -webkit-transform-style: preserve-3d;
 -moz-transform-style: preserve-3d;
 transform-style: preserve-3d;
 }

This is a div .container  is 100% high

.centered-div{
position: relative;
top: 50%;
transform: translateY(-50%);
text-align: center;
}

This is a div .centered-div  that we want to position vertically.