Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old September 27th, 2006, 08:35 AM
Steve Swift
Guest
 
Posts: n/a
Default Right align content of <INPUT> field

If it is possible, could someone demonstrate how to make the text
entered into an <INPUT TYPE=TEXTfield right-align within the entry
field, please?

The fields in my form are for numbers, and they look strange aligned left.

--
Steve Swift
http://www.ringers.org.uk
  #2  
Old September 27th, 2006, 09:35 AM
Leif K-Brooks
Guest
 
Posts: n/a
Default Re: Right align content of <INPUT> field

Steve Swift wrote:
Quote:
If it is possible, could someone demonstrate how to make the text
entered into an <INPUT TYPE=TEXTfield right-align within the entry
field, please?
>
The fields in my form are for numbers, and they look strange aligned left.
input.whatever {
text-align: right;
}

But that will probably confuse users. I wouldn't recommend it.
  #3  
Old September 27th, 2006, 10:25 AM
vynogradov@gmail.com
Guest
 
Posts: n/a
Default Re: Right align content of <INPUT> field

If it is possible, could someone demonstrate how to make the text
Quote:
entered into an <INPUT TYPE=TEXTfield right-align within the entry
field, please?
Have you already tryed align="right" or style="text-align: right"?

  #4  
Old September 27th, 2006, 03:35 PM
Steve Swift
Guest
 
Posts: n/a
Default Re: Right align content of <INPUT> field

Have you already tried align="right" or style="text-align: right"?

I hadn't tried that, but it produced exactly the effect that I wanted.
Thank you!

And Leif, no need to worry about the "user" - that's me. I agree
entirely that it's a very odd effect when you're not expecting it!
However, I tend to use right-aligned fields in Word documents quite
regularly, so I'm over the worst of the effects!

--
Steve Swift
http://www.ringers.org.uk
  #5  
Old September 27th, 2006, 06:15 PM
Stephen Poley
Guest
 
Posts: n/a
Default Re: Right align content of <INPUT> field

On Wed, 27 Sep 2006 04:45:34 -0400, Leif K-Brooks
<eurleif@ecritters.bizwrote:
Quote:
>Steve Swift wrote:
Quote:
>If it is possible, could someone demonstrate how to make the text
>entered into an <INPUT TYPE=TEXTfield right-align within the entry
>field, please?
>>
>The fields in my form are for numbers, and they look strange aligned left.
>
>input.whatever {
text-align: right;
>}
>
>But that will probably confuse users. I wouldn't recommend it.
A quick check of three different mobile phones reveals that they all
right-align the numbers being typed in, so I suggest that an awful lot
of people will already be familiar with the concept. (Pretty strange
actually - right-aligning *telephone* numbers isn't a sensible thing to
do, as there are no column weights involved. Telephone numbers are
really just a special kind of text string.)

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles