html textarea resize code example

Example 1: disable textarea resize

textarea {   /* for all text* area elements */
  resize: none;
}

#foo {                  /* for particular id */
  resize: none;
}

Example 2: textarea resize off

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

Example 3: 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 4: scale textarea

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

Tags:

Html Example