Html css

Vertical Align With Table

Posted by Weston Ganger on June 20, 2014

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;
}

Posted in HTML / CSS and Tagged with css vertical-center 


Need help on your next project or application?

I specialize in Ruby-on-Rails, AngularJS, Javascript, Bootstrap, and Hybrid Mobile Apps with Cordova & Ionic.

Contact Me

Recommended Posts