I am looking for a way to make a <textarea>
expand as the user types, but when it expands i want it to push down all content below it. I managed to make it expandable as the user types (with javascript) but i can't make it push down content that it's below the textarea
i am using a javascript code i took from another post here on stackoverflow:
function setNewSize (textarea) {
if (textarea.value.length > 5){
textarea.cols = 90;
textarea.rows = 15;
} else {
textarea.cols = 90;
textarea.rows = 5;
}
}
and then calling it in <textarea onkeyup="setNewSize(this)"></textarea>