my div just wouldn't center. It displays in the left-top-corner. I watched a YouTube tutorial, but that didn't work out as well.
HTML:
<div id="preloader">
<div id="preloader-gif"></div>
</div>
CSS:
body{
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
overflow: hidden;
}
#preloader{
position: absolute;
width: 100%;
height: 100%;
left:0;
top:0;
background-color: #0e1e2f;
content:"";
z-index: 9999
}
#preloader-gif{
display: table;
position: absolute;
width: 25%;
height: 25%;
margin: 0 auto;
background: url(./preloader.gif) no-repeat scroll center center;
}