<div id="wrapper"> 
<div id="center"></div>
</div>
#wrapper {
  display: table-cell;
  vertical-align: middle;
  border: 1px solid black;
  height: 150px;
  width: 600px;
}

#center {
  margin: auto;
  background: red;
  height: 20px;
  width: 20px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.