Sunday, January 27, 2013

Turn off resize textarea in Chrome & Safari

There is a new feature in both Safari and Chrome that allows a textarea to be resized by the user. In both browsers the feature is seen by a little icon that is in the bottom right corner of the textarea. This feature gives the user the ability to choose how much space they need for whatever it is they are writing.

The following CSS can be used to remove the users ability to resize the textarea:
1) textarea{resize: none}

Example:
<textarea style="resize: none;" cols="20" rows="2" name="Textarea"></textarea>