Silicon Thumb

Since the 1980s, I've worked with computers, watched them grow, shrink, change and improve. I've worked with a lot of users and solved a lot of problems in that time too, so I thought this would be a good place to share some of the random things I've found and solved. If you have some odd problem, email me. If I can figure it out I'll post the answer here.

My Photo
Name:
Location: Mansfield, Texas, United States

I am a veteran computer geek, but I prefer the term 'Hired Gun', since that gives the (misleading) impression that I know what I'm talking about. I have worked on all sizes of system as an engineer, developer, technical support and operations, and at all levels from Operator to CIO.
I have some certifications, but what they are depends on what Microsoft is calling them this week.

If you have a question, and don't mind the answer being posted, email me here, removing the spam stopper.

Thursday, November 16, 2006

Right Aligning Text in an html text box


This one was bugging me yesterday. Since it took a while to find the answer I figured this is a good example of what is supposed to be in this blog.




As long as you are not using an early version of Netscape, this should work. Basically this is what we do:

[input type="text" style="TEXT-ALIGN: right" size="30" value="This is a right aligned Text Box"]

(The PRE and < tags don't work in Blogspot, so just replace the [ with a < and the > with a ] )

The key piece is style='text-align: right;'. There is basically a mini-style sheet inside the Text Box. Why do we care? Well if you have cells with numbers it can mean that you can now format and enter numbers the way users expect to see them, like this:



...instead of like this:




Enjoy your Thursday :)

0 Comments:

Post a Comment

<< Home