Vertically align text next to an image?
Asked 07 September, 2021
Viewed 2.6K times
  • 55
Votes

Why won't vertical-align: middle work? And yet, vertical-align: top does work.

span{
  vertical-align: middle;
}
<div>
  <img src="https://via.placeholder.com/30" alt="small img" />
  <span>Doesn't work.</span>
</div>

24 Answer