Reputation: 23
This question might already have been asked before but I couldn't find one where it could help me. anyway, I've created a text box with following script:
css:
.cln{
top:220px;
width:680px;
height:350px;
text-align:left;
overflow:scroll;
white-space: nowrap;
overflow:hidden;
text-overflow:ellipsis;
}
<input type="text" class="cln" placeholder="That is my pet right there:)" maxlength="2024"/>
The problem is that the text box typing starts from the center 50% to 50%
and never scrolls to vertical scroll, As much as you type line goes horizontal.
But I want it to start from top left and never cross the text box borders.
All I could do so far is to change, remove white-space overflow text-align
and so, But none helped.
Thanks in advance:)
Upvotes: 2
Views: 6579
Reputation: 566
Can you use textarea instead of input?
<textarea type="text" class="cln" placeholder="That is my pet right there:)" maxlength="2024"/></textarea>
Upvotes: 0
Reputation: 2233
Use textarea
like below. It will auto scroll
This will scroll automatically...<br/>
<textarea type="text" class="cln" placeholder="That is my pet right there:)" col=30 rows=10> </textarea>
Upvotes: 2
Reputation: 606
Use textarea not input
<textarea class="cln" placeholder="That is my pet right there:)" />
Upvotes: 0