I need to align a few lines of text to the middle. Here is a rough guide to the markup I'm working with.
<ul> <li> <a href='#'>This should be centered.</a> <li> </ul>
So, as you can see from my image, the link "work" should be centered vertically. My width and height are set using vertical-align: middle;
. I know that you need to set the line height so that it really works, but there is a problem. If I set the line height to 72px (element height), then some of the links will stretch the page due to the fact that they occupy two lines.
Is there a way to align multiple lines of text to the middle without using line height?
Thanks.
source share