Jump to content

How do I display the tail end of a textfield?


roughie

Recommended Posts

My textfield is n pixels long.

Sometimes it holds a string longer than n

for which the tail end of the string

is more important for display than its beginning.

 

E.g., if the field held stock symbols

dabbled with in chronological order,

I'd like the last ones to display by default,

rather than those dealt with more remotely.

 

How, with CSS, do I shift the contents of the relatively

short field to the left, so the right edge of its long

content is visible?

(The way it's viewed were I to place my

cursor into the field and scroll to the right edge.)

 

If text is shorter than textfield's size,

text-align: right; will align what's there rightwards.

 

However, if the field's text holds text longer than

textfield's size, it will not display the tail edge,

as I wish it could.

Link to comment
Share on other sites

I could be wrong, but I think you are going to need a scripting solution for this, either javascript or php. I don't think it can be done purely with CSS.

 

Though someone else may be able to come up with something I'm not thinking of.

Link to comment
Share on other sites

you should NOT be ourring this kind of information in a textarea its tabular data and should be in a table...

 

you could use some ajax o update the table and add new content to teh top of it so that the latest infor is most prominant.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.