John John - 1 month ago 11
CSS Question

How to make text box scroll vertical in overflow css html?

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:

<input type="text" class="cln" placeholder="That is my pet right there:)" maxlength="2024"/>


css:

.cln{
top:220px;
width:680px;
height:350px;
text-align:left;
overflow:scroll;
white-space: nowrap;
overflow:hidden;
text-overflow:ellipsis;
}


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:)

Abk Abk
Answer

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>