|
||||||
| HTML Programming Forum discussion covering HTML, XHTML, DHTML and all flavors of HTML. Hypertext Markup Language is used to create websites. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
When posting code please use code tags. There are PHP, HTML and CODE tags that can be used while posting code segments.
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! HTML Code:
<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> Last edited by John; 03-22-2007 at 11:01 PM. |
| Sponsored Links |
|
|
|
|||
|
The text IS displayed in the center of the field. (try changing the border to 1 and you will see for yourself
)the problem is with the picture. The pic is displayed in the top left corner of the cell, and because of all the hidden input tags there is some white space below the picture and because of it it seems like the texk is on the bottom of the imege. So either remove the hidden input tags, or try messing with the styles... |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| About HTML | Onur | Tutorials | 0 | 08-28-2007 07:13 PM |
| Problem with JApplet and HTML page?? | stack | Java Help | 10 | 08-22-2007 10:16 AM |
| ODBC API - Special Table and Column Names | Tronman | Database & Database Programming | 0 | 07-30-2007 01:52 PM |
| HTML Introduction | clookid | Tutorials | 5 | 01-08-2007 10:43 PM |
| What is HTML, DHTML and XHTML? | Lop | HTML Programming | 5 | 08-09-2006 12:00 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |