Html css

Vertically Align Text With Css

Posted by Weston Ganger on April 30, 2014

Searching for a method to center text in a div or whatever with just css which also works in IE5, 6, & 7

Set the line-height equal to div height

Example:


.whatever{
  width:100px;
  height:100px;
  line-height:100px;
}

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