I've tried the vertical-align property, but failed to align the span in the middle:
.foo {
width: 500px;
height: 50px;
background-color: powderblue;
display: inline-block;
}
.img {
width: 50px;
height: 50px;
}
.bar {
vertical-align: middle;
}
<div class="foo">
<img class="img" src="http://dmrctt.com/wp-content/uploads/2012/10/Address-FTN-Image_1322320725.jpg" alt="">
<span class="bar"> Lorem ipsum dolor sit amet </span>
</div>
I've also tried with the display: inline-block and expected that I could now align the span in the middle of the div. Why is this not working?