Here's my HTML:
<div class="overlay">
<div id="loading">
<img src="styles/images/30.gif">
</div>
</div>
I want to make it centered vertically and horizontally.
The image is only centered horizontally, as shown on the screenshot below:
.overlay {
background: #e9e9e9;
display: none;
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: .5;
}
#loading {
text-align: center;
}
#loading img {
display: table-cell;
margin: 0 auto;
}
What should I do to make it centered vertically? Thanks in advance.