Zachary Foster
Zachary Foster

Reputation: 1

How to set a maximum in a textarea?

I am trying to make a textarea but I want to make it so the user cannot make it bigger or smaller. I still want them to be able to type in it. Just not control the textarea with the little control button in the bottom right corner. Any suggestions?

Upvotes: 0

Views: 40

Answers (3)

Shariq
Shariq

Reputation: 275

use this:

textarea { resize: none;} 

Upvotes: 1

jmore009
jmore009

Reputation: 12923

you can do this with resize: none set on textarea

Upvotes: 0

Fahad Hasan
Fahad Hasan

Reputation: 10506

You will need to set the resize property of your textarea to none:

textarea {
    resize: none;
}

textarea {
  resize: none;
}
<textarea rows="4" cols="50">
  At w3schools.com you will learn how to make a website. We offer free tutorials in all web development technologies.
</textarea>

Upvotes: 1

Related Questions