Textarea - disable resizing by x or y?

I know that you can disable textarea resizing using:

 textarea { resize: none; } 

But is it possible to disable either x or y? instead of two

+43
css resize textarea
Aug 29 '14 at 11:48
source share
2 answers
 resize: vertical; 

or

 resize: horizontal; 

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

+77
Aug 29 '14 at 11:50
source share

Of course this 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 vertical resizing: vresize

for horizontal resizing: hresize

+7
Dec 15 '16 at 8:26
source share



All Articles