Logo - Albert Walicki

How to Disable the Resize of the <textarea> HTML Element?

To disable resizing of textarea, we need to set only one CSS property.

To disable resizing an <textarea> element in HTML, you can use the resize property and set it to none. Here is an example:

<textarea style="resize: none;"></textarea>

As a result, the user won't be able to resize the textarea> element using the resize handle that, by default, appears in the component's bottom-right corner. Remember that this property does not affect other elements like input; only textarea> components are.

See more solutions!


How to add a placeholder for HTML <select> component?


How to change element's class with Javascript?

Short cheatsheet for adding, removing, and toggling CSS classes in vanilla javascript. You no longer have to remember it!

Logo - Albert Walicki

Hello, I'm a frontend developer with over six years of experience, freelancer. I'm also a mentor for junior frontend developers. I wrote a book for Junior Frontend developers called Frontend Unicorn.

BlogGlassmorphismAurora UIShapes in CSSUnique css illustrations

Get in touch!

Have a question or need a project? Contact me!

© 2020-present Albert Walicki. All Rights Reserved