Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome : make non resizable textareas

By default, Chrome makes my textareas resizable. I wish to control this and either make them only vertically resizable, or not at all.

How can I achieve this ?

like image 872
glmxndr Avatar asked Jan 19 '10 18:01

glmxndr


People also ask

How do I resize textarea in HTML?

You can resize a textarea by clicking on the bottom right corner of the textarea and dragging the mouse.


2 Answers

Rails generate standard textarea tag, but Safari/Chrome (Webkit) display all (not only Rails :) textareas as resizable.

Its apperance may be disabled by CSS

textarea {     resize: none;     } 

Or, if need only vertical resize:

textarea {      resize: vertical;      } 
like image 63
ingeniarius Avatar answered Sep 19 '22 14:09

ingeniarius


Set max-width to make them only vertically resizable, or set max-height and max-width to stop all resizing.

However, be aware that breaking user expectations about how their browser treats controls tends to create a lot of user frustration.

like image 28
jball Avatar answered Sep 17 '22 14:09

jball