Thread: Right Justify
Results 1 to 10 of 10
02-06-2002, 04:08 PM #1
Is there any way to make text you type into an Input Text box begin at the right of the box or in the center of the box? I know you can align Table Items to the right, but suppose you have an Input Type=Text as a cell in your table. There seems to be no way to make the Text start typing from the right side of the Text Box no matter what type of alignment you put on the TD tag. I'm wanting the actual text inside the box to align to the right side of the box, not the TD itself. Any suggestions appreciated greatly!
02-06-2002, 04:29 PM #2
wow, thats a new one!
lol. No-one has ever asked this one before.
First glance, I would say 'no'.
You could probably 'fake' it by using maybe a padding-left: 10px style in the input tag.
try that, see if it works, if not, post again.
Welcome to the forum, by the way!
02-07-2002, 08:01 AM #3
Thanks for your Reply, I'll give that a try. I'm very new to Web Page Forms development, but have been programming in Visual Basic for many years. I guess I asked this because in VB, often if I have a list of columns that a user is entering data into, I want all the numbers to line up to the right. Can I do this with the Input Text Box? Can I do some sort of Event programming when they leave the Input Text Box and Right Justify the field with VB Script? I'm still trying to get the hang of Web Pages and what sort of event programming you can do with them. In Visual Basic as I'm sure you know, you can program based on anything from Tabbing through fields to rolling the mouse. I appreciate the help!
02-07-2002, 09:49 AM #4
One suggestion to help maintain your sanity on the web for the rest of your internet life:
Remember that web pages are viewed by people all over the world - many with limited browsing skills and slow computers. Don't make the web page, including FORMs interactions, more sophisticated than the visitor coming to it. (That doesn't mean that the "invisible to users" internal web page coding can't be as sophisticated as one wants to make it - just don't let the fancy-schmancy techniques therein visible and thereby confusing to the visitor.)
02-07-2002, 10:08 AM #5
02-07-2002, 11:05 AM #6
Sounds like you're on your way to getting involved in 'interactive' FORMs; ie., those that minimize the redundancy of typing by the user and change options presented on subsequent choice screens based upon choices made on prior screens. And, saves all that data into an online (confidential) database that eliminates almost all the need for typing on subsequent visits - something that's really user friendly.
A friend of mine in Washington has paid $50,000 to have professionals set something like that up for her yet to be announced interactive web site. They've been working on it for the past year.
Good luck - there's a good future in that knowledge base.
02-07-2002, 01:54 PM #7
Good words from benzden there.
onblur() & onfocus() might be useful for what you are trying to recieve. I think you might be able to knock something up with them, but to be honest, it would probably be quite buggy, and would use an awful lot of cpu resources for the client (for some reason, messing with form inputs is really hard for some browsers to keep up for any length of time).
An extremely simple example of innerHTML use is here -
Basically, onmouseout() and onmouseover() generate html in a <div>.
02-07-2002, 05:47 PM #8
That reminds of what seems to be the primary problem with FORMs - especially multi-screen FORMs like those involved with interactivity:
the more screens there are and the longer the wait, the more likely the user is going to lose their connection and/or place during some step in that process - what can really piss some people off and make them go somewhere else for what they want.
The solution has to be in the 'confidential' online database AND in keeping track of each step in the process so that the user can return to EXACTLY where they left off when disconnect problems arise. That's easy enough to do from page to page but involves much more complexity and "interactivity" with the user's keystrokes within any one page. In other words, something must keep track of each separate <INPUT ...> step in the FORM process BEFORE any page <ACTION ...> commands are executed. It might be easier to just have multiple mini-<ACTION ...> steps, one after each <INPUT ...> item on the page, that the user 'hovers' over or clicks before proceeding to the next step, but, then, I'm not programming this stuff ...
02-08-2002, 03:41 PM #9
Thats some good thoughts there.
Got me thinking now... after each field you can update to a database...hmmm...onblur() should be able to handle.
Still, Its a fantastic idea. I will be looking into that. If I get anywhere, I'll be posting it here!
02-08-2002, 04:32 PM #10
Look forward to seeing your efforts.