Hey,
I am trying to get the text in the second cell of this HTML table to be centered vertically in the middle of the the image in the first cell. See the code. For some reason the text is always positioned at the bottom of the cell! Sorry for all the encrypted stuff, but this is how I can replicate this problem. Basically I want the text 'Sample Text' to be properly vertically aligned. valign="middle" is not working!

<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr valign="middle">
<td width="20%"><form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHiAY (...) PKCS7-----">
</form></td>
<td>Sample Text</td>
</tr>
</table>

Try <td valign="middle" ...etc> instead of <tr valign="middle" ... etc> ... alternatively; try the vertical-align: CSS property (on the TD again).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.