DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   HTML and CSS (http://www.daniweb.com/forums/forum143.html)
-   -   Text input box alignment question (http://www.daniweb.com/forums/thread53602.html)

michael123 Aug 28th, 2006 4:00 pm
Text input box alignment question
 
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.

mostafadotnet Aug 28th, 2006 5:46 pm
Re: Text input box alignment question
 
Hi michael123,
This is an easy task since it can be done using a property[setting a property].

Quote:

TextBox1.TextAlign = HorizontalAlignment.Right
Good luck.

tgreer Aug 28th, 2006 5:58 pm
Re: Text input box alignment question
 
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.

michael123 Aug 28th, 2006 6:05 pm
Re: Text input box alignment question
 
Thank you very much for your response.

dss Aug 31st, 2006 3:03 am
Re: Text input box alignment question
 
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


All times are GMT -4. The time now is 8:09 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC