Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > HTML Programming

HTML Programming Forum discussion covering HTML, XHTML, DHTML and all flavors of HTML. Hypertext Markup Language is used to create websites.

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-21-2007, 09:55 AM
Carrym Carrym is offline
Newbie
 
Join Date: Mar 2007
Age: 25
Posts: 3
Rep Power: 0
Carrym is on a distinguished road
Default HTML table vertical aligning problem

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>
When posting code please use code tags. There are PHP, HTML and CODE tags that can be used while posting code segments.

Last edited by John; 03-22-2007 at 11:01 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!

Sponsored Links
  #2 (permalink)  
Old 03-21-2007, 11:07 AM
McZika McZika is offline
Newbie
 
Join Date: Mar 2007
Posts: 1
Rep Power: 0
McZika is on a distinguished road
Default

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...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3 (permalink)  
Old 03-22-2007, 11:04 PM
John's Avatar   
John John is offline
Co-Administrator
 
Join Date: Jul 2006
Age: 20
Posts: 3,478
Last Blog:
Joomla! And Incompeten...
Rep Power: 20
John has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond reputeJohn has a reputation beyond repute
Send a message via AIM to John Send a message via MSN to John
Default

Quote:
Originally Posted by McZika View Post
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...
Im not sure it has anything to do with the hidden inputs or forms. If you try with just an image, with out any forms, it still behaves the same way.

Just out of curiosity, is there a reason you CANT use a table?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

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


All times are GMT -5. The time now is 07:55 AM.

Contest Stats

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

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads