473,779 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to right or centre align the text box

236 New Member
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
3 13302
happyse27
236 New Member
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
happyse27
236 New Member
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
happyse27
236 New Member
@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

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

Similar topics

16
2900
by: Andy Mabbett | last post by:
The page at: <http://www.westmidlandbirdclub.com/club/logo.htm> has a logo "floated" in the top left, and another "floated" in the top right, with the H1 heading centred between them (and this centred on the page). I would like to only have the logo top left, but retain the centering of
6
100411
by: Craig Thomson | last post by:
How can I have some text aligned to the left of the page and some more text aligned to the right using only CSS without a table? SPAN doesn't have any alignment, and there is only a single DIV block per line, and so only one alignment. TIA Craig
8
20033
by: André Hänsel | last post by:
Hi! When I put a table into a table and try to align it right, it works in IE but not in Firefox. Simplest code to reproduce: <html> <body> <table style="width: 100%"> <tr>
10
3837
by: Dave | last post by:
Hi, I have a centred table 700px wide. I'd like to use CSS instead of a table. Is the following the best, relatively standards compliant way for a non-expert to have content centred that will be rendered right by the main browsers incl IE5.5? And if you state 0 as a value, does it have to be followed by px or em etc or can it be left just as 0?
0
1291
by: Al Findlay | last post by:
Hello! I have a listview which has a column of images. The problem is, I want to be able to align the images to the centre of the column. By default, the images always align to the left. Can anyone help? Thanks,
5
4927
by: Oliver Block | last post by:
Hello everybody, I wonder why a <span style="float:right">some text</span> might be displayed out of a surrounding div element. It is shifted to the next line. I thougt it is supposed to appear inside the surrounding div. There is
2
1601
by: Ian N | last post by:
Hi, I've been trying to get my CSS menu to float to the middle of the page. As i'm also designing to cater for users with 800 x 600 browsers, i have split the menu into two lists, this way it'll break onto the next line rather than forcing the user to scroll sideways. I can't get the two lists to float centrally, Any one got any ideas?
5
2703
by: tshad | last post by:
I have a datagrid that I cannot get to right justify a money amount (which is just a label). No matter what I do - it still right justifies it. <asp:TemplateColumn Visible="true" itemStyle-Width="100px" HeaderText="Amount Per Job" HeaderStyle-Font-Bold="true" ItemStyle-VerticalAlign="middle" ItemStyle-HorizontalAlign="right" > <itemtemplate> <asp:Label ID="JobBoardPriceDisplay" style="text-align:right" runat="server"/> </itemtemplate>
2
1788
by: ziycon | last post by:
I have the below code, now the text outside of the table will centre fine in IE and FF but the table will not centre at all in FF but is fine in IE?? <div id="search_body_wrapper"> <div id="search_body_results"> <b>3</b> result(s) found for <b>test</b>.<br /><br /> <table border="0" cellspacing="2" cellpadding="2"> <tr style="background-color: #CCCCCC;"><td style="font-weight: bold;">Case Number</td><td...
0
9632
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10302
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10136
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9925
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8958
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7478
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4036
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.