Reputation: 367
How can I align vertically my anchor that is using inline-block? http://jsfiddle.net/XdfCp/11/
If I change to block, the align works well but the anchor element didn't cover all div.
Upvotes: 0
Views: 387
Reputation: 57
Use padding-top:50%
eg:
#ListaEventosPorMes a{
display: inline-block;
width: 100%;
height: 100%;
color: White;
text-decoration: none;
background-color: #722827;
vertical-align:middle;
**padding-top:50%;**
}
Upvotes: 0
Reputation: 908
try
.dia a{vertical-align: middle}
This should work.. hope this helps
Upvotes: 0
Reputation: 175017
Remove the height: 100%
on the link. It will be vertically centered in its container.
Upvotes: 1