Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make texarea size not adjustable in google chrome

By default, the size of textarea inputs in google chrome is adjustable in the browser. Is there anyway to make it not adjustable?

like image 763
Brian Avatar asked Feb 25 '10 05:02

Brian


People also ask

How do I restrict textarea size?

In some cases, there is a need of putting a limit on the size of characters that can be typed in a textarea. So in that case, we can use maxlength attribute to control the number of characters entered in a textarea.

How do I set the fixed size textarea in HTML?

We can set the size for the text area by using rows and columns. rows*columns will be the size of the text area. For columns, we have to use the cols keyword. It is used to tell the browser how many average-width characters should fit on a single line i.e the number of columns to display.

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 this css for that:

textarea {
    resize: none;
}

More Information Here. :)

like image 54
Sarfraz Avatar answered Oct 11 '22 13:10

Sarfraz