textarea auto resize height css code example
Example 1: textarea only vertical resize
resize: vertical;
Example 2: fix textarea size
resize: none;
Example 3: html textarea auto height to amount of text
$('textarea').each(function () {
this.setAttribute('style', 'height:' + (this.scrollHeight) + 'px;overflow-y:hidden;');
}).on('input', function () {
this.style.height = 'auto';
this.style.height = (this.scrollHeight) + 'px';
});