Reputation: 49384
I have this code:
<li id="myLI">
<a id="myAnchor" href="#">
<img src="/icons/icon.png">Click Here</a>
</li>
I need to get the text to align in the middle of the icon (vertically), so I tried adding: vertical-align:middle but it's not working.
Can anyone advice please?
Thanks
Upvotes: 1
Views: 2358
Reputation: 1091
#myLI a#myAnchor img{
float:left;
margin:margin to center;
}
Margin to center is the values that you need to give according to the center of the text. eg margin : 5px 5px 0px 2px;
Upvotes: 4