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!

Right Justify Numbers 1

Status
Not open for further replies.

Dummy99

Programmer
Apr 25, 2002
30
FR
Can't find any info in HTML so I presume it has to be done in Javascript.

I have an Input box for Quantity to be entered by the user and an Input box for the Price to be filled in by a JS function. Can you tell me how to right justiy these fields with the Price being shown as $xxx,xxx

Tks
Michael
 
to right-justify, plain CSS will suffice:

Code:
<input style="text-align: right;" type="text" name="blah" />

to specify the mask of the input, you'll need a regular expression to take the entered value and replace it with the format you'd like. is this what you want?



*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top