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 


Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts