I have an image of 24x24 px inside an <a>
, which is nested in a <div>
having min-height:50px
.
The bottom and top paddings of <a>
element are 13px both.
So, height should be 24px(image height) + 13px(<a>
padding-top) + 13px(<a>
padding-bottom) = 50px right?
The problem is that the wrapper <div>
is expanding its height to 54px, except when I define the vertical-align:middle
for that image, then It's resized to 50px as desired.
Here is the code http://codepen.io/thyagosic/pen/JKYrjN
Removing the vertical-align: middle;
may help to understand the problem