Vertical Align With Table

Posted by Weston Ganger

This is supported in IE8+ and all others.


<div class="outerContainer">
  <div class="innerContainer">
  </div>
</div>

CSS:


.outerContainer{
  display:table;
  height:200px;
}
.innerContainer{
  display:table-cell;
  vertical-align:middle;
}

Article Topic:Software Development - HTML / CSS

Date:June 20, 2014

Recommended Posts