How to vertical align middle div CSS

.element {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}

Leave a Reply

Your email address will not be published. Required fields are marked *