Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Center the loading .gif in the middle of the screen? Re: Center the loading .gif in the middle of the screen?

#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;
}