Need to Align text vertically next to an image? Here is a simple way to align text vertically that is also next to an image.
Actually, this is quite simple. Apply the align to vertical to the image. Since it is all in one line, so, this is really the image that you want aligned rather than the text.
Suppose, you have a image tag and a text next to the image. So, wrap both within a div.
For example, you have below image tag:
<img src="image.jpg">
And a text:
<span style="">This is working</span>
Read Also: Horizontally center a div within a div
So, wrap both in a div and apply the below css rule.
<div> <img src="image.jpg" style="vertical-align:middle;"> <span style="">This is working</span> </div>
Result:
Motorcycle accidents often lead to severe injuries because riders have minimal protection compared to drivers…
No business owner starts his or her business with the hope of making losses. Everyone…
Car accidents can be traumatic, and the physical and psychological aftermath of a car accident…
Worker's compensation insurance deals with all those employees that get work-related injury or illness. When…
Mobile commerce is no longer a trend. It is the main stage where buyers make…
The field of education welcomes and recognizes AI's potential to provide a more immersive learning…