Explain
How do I disable the resizable property of a textarea in CSS?
To disable the resizable property of a <textarea>, use the following CSS:
textarea {
resize: none; /* disables manual resizing */
overflow: auto; /* or 'hidden' if you don't want scrollbars */
}
resize: none;prevents the user from manually dragging to resize the textarea.- Optionally, set
overflowto control whether scrollbars appear when the content is larger than the visible area.
This is well-supported in modern browsers; however, for completeness, older browsers might need vendor prefixes (e.g., -webkit-resize: none;) if you’re targeting very old versions.
Recommended Courses