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!

TextBox Text Alignment - How to right align

Status
Not open for further replies.

johnnieh

Programmer
Jun 6, 2002
4
US
I need to know how to right align or right justify an Input or ASP TextBox for data entry.

I have a form that has several lines that are monetary figures and the data entry would look like Figure 1.
Figure 1:
Line Item 1 12.34
Line Item 2 135
Line Item 3 0.50
Line Item 4 25

I would like the data entry to look like Figure 2.
Figure 2:
Line Item 1 12.34
Line Item 2 135.00
Line Item 3 0.50
Line Item 4 25.00

I can figure out number format, but havent been able to figure out the alignment
 
style="text-align:right"

should work.

either that or textAlign

can't remember whether it's camelCase or hyphenated.

penny1.gif
penny1.gif
 
Thanks so much ... the following worked!

<asp:TextBox id=&quot;TextBox1&quot; runat=&quot;server&quot; style=&quot;text-align:right&quot;></asp:TextBox>

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top