How to disable the grabber in the <textarea>
?
I mean that triangle thing which appears in the right-bottom corner of the <textarea>
.
You can set the size of a text area using the cols and rows attributes. To limit the number of characters entered in a textarea, use the maxlength attribute. The value if the attribute is in number. Specifies that on page load the text area should automatically get focus.
In order to disable a textarea (or any other input element), you can: In HTML, you can write: <textarea id='mytextarea' disabled></textarea> From jQuery, you can: $("#mytextarea"). attr("disabled","disabled");
This displays as follows in Chrome 26 on OS X: Note: Adding display: none to ::-webkit-resizer doesn't actually prevent the user from resizing the textarea, it just hides the control. If you want to disable resizing, set the resize CSS property to none .
Just use resize: none
textarea { resize: none; }
You can also decide to resize your textareas only horizontal or vertical, this way:
textarea { resize: vertical; }
textarea { resize: horizontal; }
Finally, resize: both
enables the resize grabber.
<textarea style="resize:none" name="name" cols="num" rows="num"></textarea>
Just an example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With