Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vertical-align is not working in safari and chrome

Tags:

html

css

<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...

like image 295
Joshua L Avatar asked Dec 09 '22 14:12

Joshua L


1 Answers

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

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

please view the demo.

like image 185
Airen Avatar answered Dec 29 '22 23:12

Airen