How do I position the vertical centering of multiple lines of text using a button with a specified width and height?
<a href="#">This text will take up two lines</a> a { display: inline-block height: 50px; width: 100px; }
Use line-height :
line-height
a { line-height: 50px; }
This only works if the text spans one line. If you have to deal with multiple lines, you can use display: table-cell :
display: table-cell
a { display: table-cell; vertical-align: middle; }
Add Vertically Aligned: Medium; to your CSS.
it would be better to use% or em when dealing with line height. Different browsers render text (size) differently; when you use% it adjusts auto accordingly.
a { line-height: 1.3em; }