I've scoured the internet and reviewed multiple articles, but none of them seem to solve my problem. I have a simple overlay with a loading animation that I toggle on and off. The issue is that I can't seem to center the animation both horizontally and vertically. Here is the CSS for the overlay div and the div containing the animation:
#pageOverlay {
opacity: 0.5;
background: #000;
width: 100%;
height: 100%;
z-index: 10;
top: 0;
left: 0;
position: fixed;
cursor: wait;
}
#floatingBarsG{
position:relative;
width:62px;
height:77px;
margin: auto;
}
HTML:
<div id="pageOverlay">
<div id="floatingBarsG">
<div class="blockG" id="rotateG_02"></div>
<div class="blockG" id="rotateG_03"></div>
<div class="blockG" id="rotateG_04"></div>
<div class="blockG" id="rotateG_06"></div>
<div class="blockG" id="rotateG_07"></div>
<div class="blockG" id="rotateG_08"></div>
</div>
</div>