Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Center Verticaly
<style>
/* Define the height parent */
#parent{
height: 500px;
}
.astable{
width: 100%;
height: 100%;
display: table;
.ascell{
width: 100%;
height:100%;
display:table-cell;
vertical-align:middle;
text-align:center;
}
</style>
<div id="parent">
<div class="astable">
<div class="ascell">
<!-- YOUR CONTENT -->
</div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.