4

I'm trying to make the textarea unscrollable but i'm unable to find a way to get the textarea unscrollable.

I've made a simple example in jsfiddle

Thanks in advance.
deChristo
  • 1,860
  • 2
  • 17
  • 29
Dennis Offinga
  • 85
  • 1
  • 1
  • 9
  • 3
    Possible duplicate of [How to disable resizable property of textarea?](http://stackoverflow.com/questions/5235142/how-to-disable-resizable-property-of-textarea) – MysterX Dec 12 '16 at 15:20

5 Answers5

4

Try this:

<textarea rows="10" cols="45" style="overflow:hidden;resize:none;"  placeholder="Animatie:" name="description" ></textarea>

style="overflow:hidden;resize:none;", this will fulfill your requirement hopefully.

Farah Nawaz
  • 410
  • 1
  • 3
  • 3
2

Just add in the css file:

textarea {
    resize: none;
}

or:

<textarea rows="10" cols="45" placeholder="Animatie:" name="description" style="resize: none"></textarea>

Fiddle: https://jsfiddle.net/p6am6dze/2/

deChristo
  • 1,860
  • 2
  • 17
  • 29
  • 9
    That just removes the resize handle, but doesn't affect scrolling. The jsfiddle example will still scroll if you go past the bottom. – CpnCrunch Jul 26 '17 at 19:23
0

For no resizing at all, see Luiz's answer.

For resizing in only one direction, use:

textarea { resize: vertical; }

textarea { resize: horizontal; }
0

I know I'm late but I have a solution in case what you just want is to remove the scrollbar but keep the resize property. You do:

textarea::-webkit-scrollbar {
   dipsplay: none;
}

and the scrollbar will not show. The resize seems to still show for me until the text content requires scroll.

textarea {
width: 50%;
height: 70px;
resize: vertical;
}
textarea::-webkit-scrollbar {
 display:none;
 }
<p>Add as much text as you want</p>
<textarea></textarea>

NOTE: You can still scroll, it jsut doesn't show the scrollbar.

lewism205
  • 33
  • 1
  • 6
-1
<style>
textarea {
resize: none;
}
</style>
Arun
  • 1,609
  • 1
  • 15
  • 18