<div class="parent">
  <div class="child"></div>
</div>
html,
body {
  margin:0;
  height: 100%;
}

.parent {
  position: relative;
  height: 100%;
  background-color: #f3f3f3;
}

.child {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: 200px;
  height: 200px;
  background-color: #61C1E8;
}
Rerun