Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trying to remove resizable from textarea [duplicate]

Tags:

html

css

Possible Duplicate:
How to disable resizable property of TextArea?
How to disable the resize grabber of an HTML <textarea>?

I've inherited a website to maintain and I'm not able to remove the textarea to be resizable or at least to remove the resizable "flag". Here is what I mean :

enter image description here

How can I remove this? it's not problem if it's resizable the problem is this icon showing that it is.

like image 592
Gandalf StormCrow Avatar asked Oct 07 '12 08:10

Gandalf StormCrow


People also ask

How do I stop textarea from expanding horizontally?

To prevent a text field from being resized, you can use the CSS resize property with its "none" value. After it you can use the height and width properties to define a fixed height and width for your <textarea> element.

How do I fix the text area size?

This simple CSS code disables resizing of the element. Now you can use height and width property to provide a fixed height and width to the element. Some developers also use cols and rows css property to provide textarea size.


1 Answers

You need to use resize property to prevent the textarea to be resized.

Demo

textarea {
   resize: none;
}

resize property also takes values like vertical and horizontal to resize the textarea horizontally only, or vertically only.

For Vertical only

textarea { 
   resize:vertical; 
}

For Horizontal only

textarea { 
   resize:horizontal; 
} 
like image 109
Mr. Alien Avatar answered Oct 01 '22 14:10

Mr. Alien