By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,574 Members | 3,021 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,574 IT Pros & Developers. It's quick & easy.

How to right or centre align the text box

100+
P: 236
Hi All,

I wanted to align the text box for user registration but the code just wont budge... Kindly advise what is wrong?


Cheers...
Andrew

Expand|Select|Wrap|Line Numbers
  1.   <HTML>
  2.   <HEAD>
  3.   <TITLE>Testing Form Input</TITLE>
  4.   </HEAD>
  5.   <BODY>
  6.   <FORM METHOD = "POST" ACTION = "fp.cgi">
  7.   <CENTER>
  8.   <TABLE BORDER="0" WIDTH="400">
  9.   <TR>
  10. <TD ALIGN="LEFT"><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>Customer Information</B></FONT><BR><FONT
  11. SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FF0000"><B>Fields marked 
  12. with an asterisk<BR>are required input fields.</B></FONT><BR><BR></TD></TR>
  13.  
  14.   <TR>
  15.   <TH><P ALIGN="right">Member ID * </TH>
  16.   <TD><INPUT TYPE = "text"
  17.                 NAME = "Member_Id"></TD>
  18.   <div id="memnamecont"><input id="imembernamelive" name="imembernamelive" type="text" maxlength="64" value="" onfocus="SignUp.HelpMembername('wlid')" onchange="SignUp.ValidateField(this)"/><span id="mnat">@</span><select id="idomain" name="idomain" onchange="SignUp.ValidateField(this)"><option value="cards.com">cards.com</option><option value="resume.com">resume.com</option></select><label for="idomain" style="display:none">Domains</label></div>
  19.   </TR>
  20.  
  21.  
  22.  
  23.   <TABLE BORDER="0" WIDTH="350" NOWRAP="NOWRAP">
  24.   <HR SIZE="2" NOSHADE="NOSHADE">
  25.   <TR>
  26.   <TH><FONT SIZE="-1" FACE="verdana, arial, helvetica" COLOR="#FF0000"><B><P ALIGN="RIGHT">First Name *</P></B></FONT></TH>
  27.   <TD ALIGN="LEFT"><B><INPUT TYPE = "text"
  28.                 NAME = "f_name"></B><BR></FONT></TD>
  29.   </TR>
  30.  
  31.   <TR>
  32.   <TH><P ALIGN="RIGHT">Last Name *</P></TH>
  33.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  34.                 NAME = "l_name"></<BR></TD>
  35.   </TR>
  36.  
  37.   <TR>
  38.   <TH><P ALIGN="right">Email Address *</P></TH>
  39.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  40.                 NAME = "Email_Address"><BR></TD>
  41.   </TR>
  42.   </TABLE>
  43.  
  44.  
  45.   <BR>
  46.  
  47.  
  48.   <TABLE BORDER="0" WIDTH="350" NOWRAP="NOWRAP">
  49.   <HR SIZE="2" NOSHADE="NOSHADE">
  50.   <TR>
  51.   <TH><P ALIGN="RIGHT">Username</P></TH>
  52.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  53.                 NAME = "Username"><BR></TD>
  54.   </TR>
  55.  
  56.   <TR>
  57.   <TH><P ALIGN="RIGHT">Password *</P></TH>
  58.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  59.                 NAME = "Password"><BR></TD>
  60.   </TR>
  61.  
  62.   <TR>
  63.   <TH><P ALIGN="RIGHT">Confirm Password *</P></TH>
  64.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  65.                 NAME = "Confirm_Password"><BR></TD>
  66.   </TR>
  67.   </TABLE>
  68.  
  69.  
  70.   <BR>
  71.  
  72.  
  73.   <TABLE BORDER="0" WIDTH="350" NOWRAP="NOWRAP">
  74.   <HR SIZE="2" NOSHADE="NOSHADE">
  75.   <TR>
  76.   <TH><P ALIGN="RIGHT">Mobile Phone</P></TH>
  77.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  78.                 NAME = "Mobile_Phone"><BR></TD>
  79.   </TR>
  80.  
  81.   <TR>
  82.   <TH><P ALIGN="RIGHT">Company Name</P></TH>
  83.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  84.                 NAME = "Company_Name"><BR></TD>
  85.   </TR>
  86.  
  87.   <TR>
  88.   <TH><P ALIGN="right">Office Phone</P></TH>
  89.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  90.                 NAME = "Office_Phone"><BR></TD>
  91.   </TR>
  92.  
  93.   <TR>
  94.   <TH><P ALIGN="right">Office Phone 2</P></TH>
  95.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  96.                 NAME = "Office_Phone_2"><BR></TD>
  97.   </TR>
  98.  
  99.   <TR>
  100.   <TH><P ALIGN="right">House Phone</P></TH>
  101.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  102.                 NAME = "House_Phone"><BR></TD>
  103.   </TR>
  104.  
  105.   <TR>
  106.   <TH><P ALIGN="right">Fax No.</P></TH>
  107.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  108.                 NAME = "Fax_No"><BR></TD>
  109.   </TR>
  110.  
  111.   <TR>
  112.   <TH><P ALIGN="right">Address</P></TH>
  113.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  114.                 NAME = "Address"><BR></TD>
  115.   </TR>
  116.  
  117.   <TR>
  118.   <TH><P ALIGN="right">Office_Address</P></TH>
  119.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  120.                 NAME = "Office_Address"><BR></TD>
  121.   </TR>
  122.  
  123.   <TR>
  124.   <TH><P ALIGN="right">Mailing Address (Please ignore if it is same as home address or office address</P></TH>
  125.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  126.                 NAME = "Mailing_Address"><BR></TD>
  127.   </TR>
  128.  
  129.   <TR>
  130.   <TH><P ALIGN="right">Company Card Verify?</P></TH>
  131.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  132.                 NAME = "CNV"></TD>
  133.   </TR>
  134.   <TABLE BORDER="0" WIDTH="350" NOWRAP="NOWRAP">
  135.  
  136.   <TABLE BORDER="0" CELLPADDING="5" BGCOLOR="#FF8000">
  137.   <TR>
  138.   <TD><INPUT TYPE="CHECKBOX" NAME="agree" VALUE="agree"></TD>
  139.   <TD><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>I agree to the Terms 
  140.   and Conditions above.</B></FONT></TD></TR>
  141.   <HR SIZE="2" NOSHADE="NOSHADE"></TD></TR>
  142.   </TABLE><BR></TD>
  143.   </TR>
  144.  
  145.  
  146.  
  147.   <P>
  148.   <INPUT TYPE = "SUBMIT">
  149.  
  150.   </TABLE>
  151.   </CENTER>
  152.   </FORM>
  153.   </BODY>
  154.   </HTML>!;
  155.  
Nov 23 '08 #1
Share this Question
Share on Google+
3 Replies


100+
P: 236
Hi all,

How to align the text boxes in similar vertical alignment for above code? Kindly advise... It is urgent...


Cheers...
Andrew
Nov 24 '08 #2

100+
P: 236
Hi all,

How to align the text boxes in similar vertical alignment for above code? Kindly advise... It is urgent...


Cheers...
Andrew
Nov 24 '08 #3

100+
P: 236
@happyse27
Resolved see line code modified..
========================

Table Border counts(changed to <TABLE BORDER="0" WIDTH="270"> from <TABLE BORDER="0" WIDTH="350">


Completed code
-----------------------
Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. #!c:/perl/bin/perl.exe
  4.  
  5. #!/usr/local/bin/perl
  6.  
  7.  
  8. print "Content-type: text/html\n\n";
  9. print qq!
  10.   <HTML>
  11.   <HEAD>
  12.   <TITLE>Testing Form Input</TITLE>
  13.   </HEAD>
  14.   <BODY>
  15.   <FORM METHOD = "POST" ACTION = "fp.cgi">
  16.   <CENTER>
  17.   <TABLE BORDER="0" WIDTH="270">
  18.   <TR>
  19. <TD ALIGN="RIGHT"><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>Customer Information</B></FONT><BR><FONT
  20. SIZE="-2" FACE="verdana, arial, helvetica" COLOR="#FF0000"><B>Fields marked 
  21. with an asterisk<BR>are required input fields.</B></FONT><BR><BR></TD></TR>
  22.  
  23.   <TR>
  24.   <TH><P ALIGN="right">Member ID * </TH>
  25.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  26.                 NAME = "Member_Id"></TD>
  27.   <div id="memnamecont"><input id="imembernamelive" name="imembernamelive" type="text" maxlength="64" value="" onfocus="SignUp.HelpMembername('wlid')" onchange="SignUp.ValidateField(this)"/><span id="mnat">@</span><select id="idomain" name="idomain" onchange="SignUp.ValidateField(this)"><option value="cards.com">cards.com</option><option value="resume.com">resume.com</option></select><label for="idomain" style="display:none">Domains</label></div>
  28.   </TR>
  29.   </TABLE>
  30.  
  31.  
  32.   <BR>
  33.  
  34.  
  35.   <TABLE BORDER="0" WIDTH="270">
  36.   <HR SIZE="2" NOSHADE="NOSHADE">
  37.   <TR>
  38.   <TH><FONT SIZE="-1" FACE="verdana, arial, helvetica" COLOR="#FF0000"><B><P ALIGN="RIGHT">First Name *</P></B></FONT></TH>
  39.   <TD ALIGN="LEFT"><B><INPUT TYPE = "text"
  40.                 NAME = "f_name"></B><BR></FONT></TD>
  41.   </TR>
  42.  
  43.   <TR>
  44.   <TH><P ALIGN="RIGHT">Last Name *</P></TH>
  45.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  46.                 NAME = "l_name"></<BR></TD>
  47.   </TR>
  48.  
  49.   <TR>
  50.   <TH><P ALIGN="right">Email Address *</P></TH>
  51.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  52.                 NAME = "Email_Address"><BR></TD>
  53.   </TR>
  54.   </TABLE>
  55.  
  56.  
  57.   <BR>
  58.  
  59.  
  60.   <TABLE BORDER="0" WIDTH="270">
  61.   <HR SIZE="2" NOSHADE="NOSHADE">
  62.   <TR>
  63.   <TH><P ALIGN="RIGHT">Username</TH>
  64.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  65.                 NAME = "Username"><BR></TD>
  66.   </TR>
  67.  
  68.   <TR>
  69.   <TH><P ALIGN="RIGHT">Password *</TH>
  70.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  71.                 NAME = "Password"><BR></TD>
  72.   </TR>
  73.  
  74.   <TR>
  75.   <TH><P ALIGN="RIGHT">Confirm Password *</TH>
  76.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  77.                 NAME = "Confirm_Password"><BR></TD>
  78.   </TR>
  79.   </TABLE>
  80.  
  81.  
  82.   <BR>
  83.  
  84.  
  85.   <TABLE BORDER="0" WIDTH="270">
  86.   <HR SIZE="2" NOSHADE="NOSHADE">
  87.   <TR>
  88.   <TH><P ALIGN="RIGHT">Mobile Phone</P></TH>
  89.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  90.                 NAME = "Mobile_Phone"><BR></TD>
  91.   </TR>
  92.  
  93.   <TR>
  94.   <TH><P ALIGN="RIGHT">Company Name</P></TH>
  95.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  96.                 NAME = "Company_Name"><BR></TD>
  97.   </TR>
  98.  
  99.   <TR>
  100.   <TH><P ALIGN="right">Office Phone</P></TH>
  101.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  102.                 NAME = "Office_Phone"><BR></TD>
  103.   </TR>
  104.  
  105.   <TR>
  106.   <TH><P ALIGN="right">Office Phone 2</P></TH>
  107.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  108.                 NAME = "Office_Phone_2"><BR></TD>
  109.   </TR>
  110.  
  111.   <TR>
  112.   <TH><P ALIGN="right">House Phone</P></TH>
  113.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  114.                 NAME = "House_Phone"><BR></TD>
  115.   </TR>
  116.  
  117.   <TR>
  118.   <TH><P ALIGN="right">Fax No.</P></TH>
  119.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  120.                 NAME = "Fax_No"><BR></TD>
  121.   </TR>
  122.  
  123.   <TR>
  124.   <TH><P ALIGN="right">Address</P></TH>
  125.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  126.                 NAME = "Address"><BR></TD>
  127.   </TR>
  128.  
  129.   <TR>
  130.   <TH><P ALIGN="right">Office_Address</P></TH>
  131.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  132.                 NAME = "Office_Address"><BR></TD>
  133.   </TR>
  134.  
  135.   <TR>
  136.   <TH><P ALIGN="right">Mailing Address (Please ignore if it is same as home address or office address</P></TH>
  137.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  138.                 NAME = "Mailing_Address"><BR></TD>
  139.   </TR>
  140.  
  141.   <TR>
  142.   <TH><P ALIGN="right">Company Card Verify?</P></TH>
  143.   <TD ALIGN="LEFT"><INPUT TYPE = "text"
  144.                 NAME = "CNV"></TD>
  145.   </TR>
  146.   <TABLE BORDER="0" WIDTH="270">
  147.  
  148.   <TABLE BORDER="0" CELLPADDING="5" BGCOLOR="#FF8000">
  149.   <TR>
  150.   <TD><INPUT TYPE="CHECKBOX" NAME="agree" VALUE="agree"></TD>
  151.   <TD><FONT SIZE="-1" FACE="verdana, arial, helvetica"><B>I agree to the Terms 
  152.   and Conditions above.</B></FONT></TD></TR>
  153.   <HR SIZE="2" NOSHADE="NOSHADE"></TD></TR>
  154.   </TABLE><BR></TD>
  155.   </TR>
  156.  
  157.  
  158.  
  159.   <P>
  160.   <INPUT TYPE = "SUBMIT">
  161.  
  162.   </TABLE>
  163.   </CENTER>
  164.   </FORM>
  165.   </BODY>
  166.   </HTML>!;
  167.  
  168.  
Nov 24 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.