1textarea { /* for all text* area elements */
2 resize: none;
3}
4
5#foo { /* for particular id */
6 resize: none;
7}
1<textarea class="myTextArea"></textarea>
2<style>
3 .myTextArea {
4 resize: none;
5 }
6</style>
1to disable all
2
3textarea { resize: none; }
4only vertical resize
5
6textarea { resize: vertical; }
7only horizontal resize
8
9textarea { resize: horizontal; }
10disable vertical and horizontal with limit
11
12textarea { resize: horizontal; max-width: 400px; min-width: 200px; }
13disable horizontal and vertical with limit
14
15textarea { resize: vertical; max-height: 300px; min-height: 200px; }
1You can either apply this as an inline style property like so:
2<textarea style="resize: none;"></textarea>
3or in between
4<style>...</style> element tags like so:
5textarea { resize: none; }