Jane Marjana
Jane Marjana

Reputation: 7

image anchor and text not aligned vertically

I have below menus

    <ul id="fMenu">
<li><a href="#"><img src="images/connect/Facebook.png">Be a Fan</a></li>
<li><a href="#"><img src="images/connect/Twitter.png">Follow Us</a></li>
<li><a href="#"><img src="images/connect/Google+.png">+1</a></li>
<li><a href="#"><img src="images/connect/Flickr.png">Flickr</a></li>
<li><a href="#"><img src="images/connect/Tumblr.png">Tumblr</a></li>
</ul>

My problem is that link text is displayed somewhat below the image i want the text to be against the middle of the image

Regards Jane

Upvotes: 0

Views: 67

Answers (1)

pstanton
pstanton

Reputation: 36640

you probably want to set the vertical-align property on your image, most likely middle or text-bottom

<img ... style="vertical-align:middle;" />

EDIT:

since you posted some code, do it in stylesheet:

ul#fMenu li a img {vertical-align:middle;}

Upvotes: 1

Related Questions