This seems trivial, but I cannot find anything. I have a text and small image (icon) inside the text like this:
<span>ask<img src=ask.svg height=16> fav<img src=fav.svg> voted</span>
All I need is to move the image few pixels up or down to look better with the text.
I tried CSS styles like margin-top:3px, padding-top:3px, display:absolute, display:relative and some others, but nothing works.
UPDATE: I do not need vertical align to middle. Yes, it looks better, but I still want to be able to shift the image a few pixels manually. So my question remains: how to fine tune the image vertical position within the text by a few pixels in any direction.

You can set position: relative for img, then move it with top or bottom
http://jsfiddle.net/kencoder97/xu4158fL/
An example to move an image upwards by a couple of pixels would be
<img src="my_image.jpg" style="position: relative; bottom: 2px">
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