Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stop text-area from resizing in Safari

Safari gives resize handles for text-areas. anyone knows how to stop that? thanx

like image 238
pixeltocode Avatar asked Apr 02 '10 02:04

pixeltocode


People also ask

How do I restrict textarea size?

To disable the resizing (drag thumb) just use resize: none; . To restrict size max(min)-width and height should do the trick. Show activity on this post. You can set the resize property as horizontal and vertical or set it as default(the user can stretch in both ways).

How do I set the fixed size textarea in HTML?

The <textarea> element is often used in a form, to collect user inputs like comments or reviews. A text area can hold an unlimited number of characters, and the text renders in a fixed-width font (usually Courier). The size of a text area is specified by the cols and rows attributes (or with CSS).

How do you auto expand textarea?

It can be achieved by using JavaScript and jQuery. Method 1: Using JavaScript: To change the height, a new function is created which changes the style property of the textarea. The height of the textarea is first set to auto. This value makes the browser set the height of an element automatically.


1 Answers

You can use CSS3 to prevent the resizing:

textarea {
   resize: none;
}
like image 128
Hussein Abbas Avatar answered Sep 29 '22 03:09

Hussein Abbas