I need to place a div exactly in the middle of the page with an unknown width and height. I can get it centered with the width but is it possible to get it centered with the height?
HTML:
<div class='lightbox'>
<div class='tc-content'>AAA</div>
</div>
CSS
.lightbox {
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background: #000;
text-align: center;
}
.tc-content {
display: inline-block;
}