I was wonder how I can create a text input that has an auto-adjustable height so that it gets taller to fit your text? For example, if I start typing a paragraph, it expands from a few lines to fit the paragraph.
Here's what I've currently got:
#commenttext {
width: 413px;
min-height: 22px;
max-height: 100%;
display: inline;
font-size: 11px;
color: #777777;
word-wrap: break-word;
font-family: "Open Sans", "Tahoma";
top: 7px;
position: relative;
left: 7px;
padding-left: 7px;
}
<form action="" method="POST">
<input type="text" id="commenttext">
</form>
But that's just a normal text area.
How can I make that text area get taller as I type more lines? Do I need Javascript?