.roles span {
display:inline-block;
width:80px;
}
<div class="roles">
<img alt="test" src="images/02_button_add.png">
<span>AlexAlexAl exAlexAlex AlexAlexAlex </span>
</div>
I am using display:inline-block;
to put span
text next to my img.
However, the image is on the left-bottom side of my span.
How to make them horizontal?
Use vertical-align:top to your image.
.roles img
{
vertical-align:top;
}
Take a look at this fiddle: http://jsfiddle.net/gox5droc/
This will ensure the image will be aligned on top of the div.
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