textarea css resize code example

Example 1: prevent textarea resize css

textarea {
  resize: none;
}

Example 2: textarea only vertical resize

resize: vertical;

Example 3: textarea resize off

<textarea class="myTextArea"></textarea>
<style>
  .myTextArea {
    resize: none;
  }
</style>

Example 4: resize in css

/* Keyword values */
resize: none;
resize: both;
resize: horizontal;
resize: vertical;
resize: block;
resize: inline;

/* Global values */
resize: inherit;
resize: initial;
resize: unset;

Example 5: scale textarea

<textarea rows="10" style="font-size:2vw; width:100%;"></textarea>

Tags:

Css Example