Wed, 2005-04-06 01:51
<div class="tnlquicklink"><a href=""><img src="images/tnl-quicklink.gif" alt="image: arrow" width="32" height="30" border="0" /></a><a href="">2005 Teaching and Learning Calendar</a></div>
What is the best way to align text with the middle of an image with CSS?
Wed, 2005-04-06 02:14
#1
Aligning text with image
.tnlquicklink img{ vertical-align: middle; }
Wed, 2005-04-06 02:31
#2
Aligning text with image
Thanks for your quick reply.
tried what you wrote.
Works in IE but doesn't seem to quite middle align in Firefox for Windows.
So I have added in:
<a class="tnlqlinktext" href="">2005 Teaching and Learning Calendar</a>
a.tnlqlinktext { vertical-align: middle; }
Don't understand why I need to do this but it seems to work in both browsers now?