I know it's possible to disable the resize of a textarea
by using:
textarea {
resize: none;
}
But is it possible to disable either x or y? instead of both
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.
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.
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).
resize: vertical;
or
resize: horizontal;
Quick fiddle: http://jsfiddle.net/LLrh7Lte/
Sure it is possible with css and jquery
CSS:
resize: vertical;
resize: horizontal;
jQuery
$('textarea').css("resize", "vertical");
$('textarea').css("resize", "horizontal");
Bootstrap just put the class in Textarea
for the vertical resize: vresize
for the horizontal resize: hresize
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