How to Prevent HTML textarea From Being Resized?

Find out how you can stop/disable the HTML textarea element from being resized

By default, an HTML <textarea> element is resizable. However, you can change that by specifying resize: none as a style rule in your CSS, for example, like so:

textarea {
    resize: none;
}

It is also possible to allow resizing only horizontally or vertically by specifying "horizontal" or "vertical" as a value to the CSS resize property, for example, in the following way:

textarea {
    resize: vertical; /* allow vertical resizing only */
}
textarea {
    resize: horizontal; /* allow horizontal resizing only */
}

Conversely, you can allow resizing both, horizontally and vertically, by setting "both" as the value to the CSS resize property:

textarea {
    resize: both; /* allow horizontal/vertical resizing */
}

Hope you found this post useful. It was published . Please show your love and support by sharing this post.