bouncingHippo
bouncingHippo

Reputation: 6040

input box long text doesnt end, scrolls horizontally to reveal hidden text

So i have made column widths for my input text (which i am mandated by client to do so...)

    <td colspan="1" width="250">
             <input type="text" id="CUSTOMER_NAME" 
               name="APPLICATION.CUSTOMER_NAME" 
               value="ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567891011" 
               size="30" 
               maxlength="30"/>
     </td>

At first look, it does seem like its truncated. Like below. But in actual fact once you double-click on the text, you can scroll horizontally to reveal the text further to the right

enter image description here enter image description here

Is there any way to prevent the horizontal scroll and have the text wrap to the second line for IE 7 without using textarea?

Expected outcome: enter image description here

Upvotes: 0

Views: 263

Answers (3)

Scott Selby
Scott Selby

Reputation: 9580

is it an option to do something like on focus width: 100% , then blur back to what the client specified as their desired width?

Upvotes: 0

Samantha Branham
Samantha Branham

Reputation: 7451

If you want a second line, use a <textarea>. Alternatively, try using the width CSS property as in <input type="text" style="width: 100px;" />

Upvotes: 0

burmat
burmat

Reputation: 2548

Text boxes are single line only (source). I would recommend using a <textarea> to try and solve your problem.

Upvotes: 2

Related Questions