Mr. Lame Mr. Lame - 1 year ago 69
HTML Question

Aligning image and text vertically within TD element

<img src=""/>
My feed

This is how it looks like:

My feed

The icon and the text is misalligned vertically. The icon is on the top of the table cell, the text is on the bottom. Both the text and the icon occupy 16 pixel but the cell still eats up 19. How can I align them to save those 3 pixels?

Answer Source

Well, if you choose the background image method, then it is very simple:

background: url(feed.png) left center no-repeat
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download