<div class="layer">Layer Contents</div>
body{background:#ccc}
.layer{
  position:absolute;
  top:50%;
  left:50%;
  background:#f00;
  transform:translate(-50%, -50%)
}
Rerun