I am currently attempting to align the text vertically within a UL. The issue is that some list items contain multiple lines of text, preventing me from using line-height.
For reference:
The fiddle: http://jsfiddle.net/jaAYT/
Desired result:
HTML structure:
<ul class="menu">
<li> <a href="#"><span>WHAT IS TEAM X?</span></a> </li>
<li> <a href="#"><span>COMPANY BENEFITS</span></a> </li>
<li> <a href="#"><span>COMPANY, COMPANY DATA</span></a> </li>
<li> <a href="#"><span>TEAM X COVERAGE</span></a> </li>
<li> <a href="#"><span>COMPANY2 </span></a> </li>
<li> <a href="#"><span>COMPANY3 </span></a> </li>
<li> <a href="#"><span>LATEST CAMPAIGNS</span></a> </li>
<li> <a href="#"><span>CONTACT</span></a> </li>
</ul>
CSS styling:
.menu {
float: left;
margin: 0px 0px 0px 0px;
width: 720px;
}
.menu li {
float: left;
position: relative;
}
.menu li a {
width: 86px;
height: 52px;
padding: 15px 0px 15px 4px;
display: block;
float: left;
color: #fff;
font-size: 14px;
font-weight: bold;
text-decoration: none;
background-color: #ccc;
}
.menu li a:hover {
background-color: #000;
}
If you have any suggestions or solutions, please let me know. Thank you!