html - Aligning images with text -


this question has answer here:

i'm having trouble aligning image text. want image on left, , text inline on right, centered vertically image.

<div class="container">     <span class="icon">         <img ... />     </span>     <span>555-1212</span> </div> 

right now, text hugs top of container. how can center vertically middle of container?

.container span {     display: inline-block;     vertical-align: middle; } 

this should it. jsfiddle


Comments

Popular posts from this blog

c# - HttpResponseMessage System.InvalidOperationException -

sql - Postgresql error: "failed to find conversion function from unknown to text" -