Joshua L Joshua L - 1 year ago 64
HTML Question

Vertical-align is not working in safari and chrome

<div class="commentator grid_3">
<img src="http://img.gawkerassets.com/img/183mxcnx46v2cjpg/avt-large.jpg" alt="commentator">
<span class="commentator-name"><a href="#">Joshua</a></span>
</div>


So I set commentator-name vertical-align to Top.It works in firefox but not in chrome and safari.
Can someone help me out??I dont want to use position absolute when I have a perfect choice...

Answer

please add the display:inline-block to span tag.lik this:

.commentator-name{
  display:inline-block;
  vertical-align: top;
}

please view the demo.