Page 1 of 1

Centering a Form Vertically

Posted: Sun Jul 31, 2005 9:11 pm
by neugent
Ive been having problems with one of my sites, how can i place my form vertically in my cell? it seems that everytime you place a form in a cell, it adds up a space below it.

Here my site: http://www.avatar-style.com

Look in the Buyer's Login Section, it looks awful having my form like that, it messes up the positions.

Here's my code:

Code: Select all

<table width=&quote;100%&quote; border=&quote;0&quote; cellpadding=&quote;0&quote; cellspacing=&quote;0&quote;>
            <tr>
              <td width=&quote;74%&quote; valign=&quote;middle&quote; align=&quote;center&quote; ><form action=&quote;members/verifylogin.php&quote; method=&quote;post&quote;><div class=&quote;style8&quote;>
			  Email Address:
			  <input name=&quote;username&quote; type=&quote;text&quote; id=&quote;username&quote; size=&quote;30&quote; maxlength=&quote;30&quote; class=&quote;loginsetting&quote; />
              Password: 
              <input name=&quote;password&quote; type=&quote;password&quote; id=&quote;password&quote; size=&quote;20&quote; maxlength=&quote;20&quote; class=&quote;loginsetting&quote; />
              <input type=&quote;submit&quote; name=&quote;Submit&quote; value=&quote;Submit&quote; class=&quote;loginbtn&quote; /></div></form>
			  </td>
              <td width=&quote;26%&quote; valign=&quote;middle&quote;><div align=&quote;center&quote;><span class=&quote;style8&quote;><a href=&quote;index.php?content=10&quote;>Request Account</a><br><a href=&quote;index.php?content=11&quote;>Forgot your Password?</a><br>
              </span></div></td>
            </tr>
          </table>

Posted: Mon Aug 01, 2005 12:07 am
by neugent
by d way i have solved my problem, the code below caused my forms to add space below it.

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
i had changed it into the one below,

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" >
though its valid at w3c, i was wondering if its the right way, i need an opinion bout it...