Can someone help me with aligning the h2 element vertically and horizontally in the center of the div? You can find my codepen here.
html
<div class="container">
<h2 class="center">
Hello World!
</h2>
</div>
css:
.container {
position:relative !important;
height: 100%;
margin: 0 auto;
display:table;
}
.center {
text-transform: uppercase;
text-align: center;
z-index: 200;
position: absolute;
vertical-align:middle;
font-size: 4em;
margin: 0;
padding: 1em .75em 0 .75em;
line-height: .8;
text-shadow: 1px 1px 10px #666666;
display:table-cell;
}