How to center vertically?
Is there a way I can vertically center both an image and some text in (say) an <a> tag?
Whatever I try the text always demands to be aligned with the bottom of the image...
Try setting the line-height of the <a> to the height of the image.
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." Brian W. Kernighan
Still not working
This is nuts, there must be a way to do it...
Aha I've done it...
I had to set the image style to "float:left"
There is always the deprecated align="" and inside of the "", are either texttop, top, middle, absmiddle, or absbottom.
If you are doing what I think you are for a signature branding at the bottom of a page, you could also merely style the image with a margin to 'balance' it proportionally with the visible text. So, a hyperlink text with an accompanying image might resemble:
<p><a href="#">Here is my link</a><img src="#" style="width:20px; height:20px; margin-top:6px;
Last edited by WebJoel; 09-12-2006 at 08:47 AM.
I build for: Firefox and tweak for IE
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)