I have an HTML tag with a short maxlength but a long value attribute. I'd like the displayed text to show the end (right side) of the text, rather than the start (left side).
<input maxlength=10 value="A really really really long entry goes in here"/>
currently shows:
"A really r"
instead I'd like it to show:
"es in here"
Cheers,
Ian
Add the text-align property set to “right” for the input.
Align text verticallyRight-click the text box for which you want to set vertical alignment. On the shortcut menu, click Format Text Box.
If you only have one or a few blocks of text to center, add the style attribute to the element's opening tag and use the "text-align" property.
Do you want the visible area to start from the right? you can use css and the following rule input {direction:rtl;}
rtl
means from right to left
example: http://jsbin.com/ilejo4
PS: the value of maxlength
in your html must be wrapped with quotes, also you have to set the type
of the input
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With