I have an unordered list…
<ul class="hide">
<li class="home">
<div class="link">
<a href="/">Home</a>
</div>
</li>
<li class="about">
<div class="link">
<a href="/about">About Our Community</a>
</div>
</li>
<li class="contact">
<div class="link">
<a href="/contact">Contact Us</a>
</div>
</li>
</ul>
My CSS looks like this….
#sitenav ul li .link a {
color: #555;
text-decoration: none;
float: left;
padding-right: 3px;
margin-top: auto;
margin-bottom: auto;
}
But the margins do not center the link vertically
Any ideas?
This solution could work for you: http://jsfiddle.net/WLQAS/8/
margin-top: auto;andmargin-bottom: auto;don’t work to align vertically the objects.Updated CSS