By defalult the text in input box is left aligned, is it possble to have it right aligned? The reason to do this is I have a list of input box vertically, to input the price for each item, I want to show price(with decimal) right aligned so it looks more natural.

Thanks for any comment.

Hi michael123,
This is an easy task since it can be done using a property[setting a property].

TextBox1.TextAlign = HorizontalAlignment.Right

Good luck.

Actually, you would use CSS:

<input type="text" style="text-align: right">

I'm not sure what language the other poster is coding in; probably ASP.NET/VB.NET.

Thank you very much for your response.

If you are using dreamweaver of frontpage.
then just select the textbox and choose alingment.
otherwise you need to write the code as given by other user.
Thankx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.