Center Item on Page

<section>
     <div class="center"></div>
</section>

 

CSS:

section {
    width: 100%;
    height: 100vh;
    display: table;
}

section .center {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

Leave a Reply

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