Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to right-justify input objects in a form? 1

Status
Not open for further replies.

dove85

MIS
Aug 8, 2001
19
US
Does any one know how to line up (right justify) these input objects?

Your help would be appreciated.
Dove85
-----------------------------------------


<HTML>
<BODY>
<FORM NAME=&quot;OrderedItemsForm&quot; METHOD=&quot;post&quot; ACTION=&quot;SUBMITxyz.jsp&quot;>
<TABLE>
<TR>
<TD ALIGN=LEFT> </TD><TD> </TD>
<TD ALIGN=RIGHT VALIGN=BOTTOM>Unit Price</TD>
<TD ALIGN=RIGHT VALIGN=BOTTOM>Total</TD>
</TR>
<TR>
<TD ALIGN=LEFT>Ordered Qty. :</TD>
<TD><INPUT TYPE=&quot;text&quot; NAME=&quot;qty&quot; SIZE=&quot;20&quot;></TD>
<TD><INPUT TYPE=&quot;text&quot; NAME=&quot;unit_price&quot; SIZE=&quot;20&quot;></TD>
<TD><INPUT TYPE=&quot;text&quot; NAME=&quot;total_cost&quot; SIZE=&quot;20&quot;></TD>
<TR>
<TD ALIGN=LEFT>Received Qty.:</TD>
<TD><INPUT TYPE=&quot;text&quot; NAME=&quot;rec_qty&quot; SIZE=&quot;20&quot;></TD>
<TD><INPUT TYPE=&quot;text&quot; NAME=&quot;unit_price_rec&quot; SIZE=&quot;20&quot;></TD>
<TD><INPUT readOnly TYPE=&quot;text&quot; NAME=&quot;total_cost_rec&quot; SIZE=&quot;20&quot;></TD>
</TR>
<TR>
<TD ALIGN=LEFT>Returned Qty:</TD><TD ALIGN=RIGHT><INPUT TYPE=&quot;text&quot; NAME=&quot;ret_qty&quot; SIZE=&quot;20&quot;></TD></TR>
</TR>
<TR>
<TD ALIGN=LEFT>Open Quanty:</TD><TD ALIGN=RIGHT><INPUT readOnly TYPE=&quot;text&quot; NAME=&quot;open_qty&quot; SIZE=&quot;20&quot;></TD>
</TR>
</TABLE>
</TD>
</TABLE>
</BODY>
</HTML>
 
putting align in the <td> tag should justify the contents of the cell -Greg :-Q
 
Greg,

You can see that in my code, I have already tried that. Unfortunately, that only works for the &quot;labels&quot;, not for the INPUT cells.

Dove85
 
hi dove,

im not quite sure where you want to align the input boxes to but i notice from looking at your code that you have an inconsistent number of <td>'s across your rows. For the table to work properly (especially in all browsers) you need to have consistent numbers of <td>'s. You can use the colspan and rowspan attribute to make a <td> span anumber of columns (or rows) and this may well be the solution to your alignment problem.

good luck with it

rob
 
no, there are four in each row...look closer at the first row -Greg :-Q
 
o, sorry crazy, you were right i didn't see the last two rows...dove: other that aligning each <td> tag with an element i can't think of anything else.. -Greg :-Q
 
Are you trying to align the input boxes themselves, or the contents of the input boxes? If the latter try adding
Code:
style=&quot;text-align:right&quot;
to the input box tag. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
tsdragon -- That's what I have been looking for. Thank you.

Thank you all for your help, guys.

Dove85
 
oooooo, sorry...you didn't make that very clear, to me it sounding like you were trying to justify the input box -Greg :-Q
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top