Possible Redundancy:
How can I vertically align text next to an image using CSS?
I seem to be struggling with aligning my texts and an image.
The arrangement of the texts and image is as follows:
texts ---------
| image |
_________
My goal is to have the texts positioned in the middle of the div rather than at the top.
This is what I currently have:
<div id='test'> tests <img src='/images/logo.png'/> </div>
Despite applying the following css, I am still unable to achieve the desired alignment:
#test{
margin-left: 10px;
vertical-align: middle;
}
Any insights on how I can successfully align my text to the middle alongside the image would be greatly appreciated. Thank you!