Languages
[Edit]
EN

CSS - disable textarea resize button

6 points
Created by:
Lani-Skinner
748

In this article, we would like to show you how to disable textarea resize button using CSS.

Quick solution:

textarea {
    resize: none;
}

 

Practical example

This approach removes both direction resizing (vertical and horizontal).

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<head>
  <style>

    textarea {
        resize: none;
    }

  </style>
</head>
<body>
  <textarea rows="10" cols="40">This is example text...</textarea>
</body>
</html>

Alternative solutions

1. resize: horizontal

This approach removes vertical resizing.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<head>
  <style>

    textarea {
        resize: horizontal;
    }

  </style>
</head>
<body>
  <textarea rows="10" cols="40">This is example text...</textarea>
</body>
</html>

2. resize: vertical

This approach removes horizontal resizing.

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<head>
  <style>

    textarea {
        resize: vertical;
    }

  </style>
</head>
<body>
  <textarea rows="10" cols="40">This is example text...</textarea>
</body>
</html>

 

Alternative titles

  1. CSS - how to disable textarea resize button/property?
  2. CSS - How do I turn off the textarea resizing property?
  3. CSS - disable textarea resize property
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

CSS

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join