Home › Forums › CSS › Center the loading .gif in the middle of the screen? › Re: Center the loading .gif in the middle of the screen?
March 3, 2013 at 4:55 am
#126738
DADE
Participant
@CrocoDillon it will work, because position is calculated from div.white-screen, not browser window. But yeah, if you need full screen loading block, than you use position: fixed;
I probably had to mention that markup should be:
And CSS:
.white-screen {
position: relative;
}
.loading-gif {
position: absolute;
top: 50%;
left: 50%;
margin: -50px 0px 0px -50px;
}