Mosijava Mosijava - 9 months ago 38
CSS Question

how to vertically align text next to a floated image?

I want to vertically align a span after a floated image.
I searched for it in stack overflow and find this post. but my image is floated.

<img style="width:30px;height:30px; float:left">
<span style="vertical-align:middle">Doesn't work.</span>

I give
to image and nothing change!



First remove float from it. Write like this:

<img style="width:30px;height:30px;vertical-align:middle" src="">
    <span>Doesn't work.</span>

Check this