textarea - disable resize on x or y?

CssResizeTextarea

Css Problem Overview


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

Css Solutions


Solution 1 - Css

resize: vertical;

or

resize: horizontal;

Quick fiddle: http://jsfiddle.net/LLrh7Lte/

Solution 2 - Css

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

Solution 3 - Css

You must use horizontal or vertical values for property.

resize: vertical;

or

resize: horizontal;

Source: https://www.w3schools.com/cssref/css3_pr_resize.asp

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSaturnsEyeView Question on Stackoverflow
Solution 1 - CssGrim...View Answer on Stackoverflow
Solution 2 - CssSantosh KhalseView Answer on Stackoverflow
Solution 3 - CssJorge del Campo AndradeView Answer on Stackoverflow