I'm having trouble aligning an image with text. I want my image on the left, and the text inline on the right, centered vertically to the image.
<div class="container">
<span class="icon">
<img ... />
</span>
<span>555-1212</span>
</div>
Right now, the text hugs the top of the container. How can I center it vertically to the middle of the container?
.container span {
display: inline-block;
vertical-align: middle;
}
This should do it. jsFiddle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With