I'm trying to align the text inside my div both horizontally and vertically, but it's only aligning horizontally. Everything I try doesn't work... here's my css code:
#loading > h1 {
text-align: center;
font-size: 21px;
animation: fadeUpIn 3s;
-webkit-animation: fadeUpIn 3s; /* Safari and Chrome */
}
@-webkit-keyframes fadeUpIn /* Safari and Chrome */
{
from { opacity:0; top:150px; }
to { opacity:1; top: 70px; }
}
#loading{
position: absolute; top: 0; left: 0;
width:100%;
height: 100%;
background-color: gray;
color: white;
opacity: 1;
transition: 1s;
visibility: visible;
}
#loading.hidden{
opacity: 0;
visibility: hidden;
}
My html code:
<div id="loading">
<h1>Creative. Simple.</h1>
</div>
JS fiddle of the whole website: https://jsfiddle.net/sjyoqdqy/