Mosijava Mosijava - 1 year ago 103
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!


Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download