When I put multiple lines inside textarea
, it doesn't make its parent higher, but gains a scrollbar (so not like a typical div
). I guess this is default behavior but I'd like to have it resize parent instead. Parent has some initial height but should be able to become higher (think multiline chat input).
Code:
<div class="parent">
<textarea></textarea>
<div class="other"></div>
<div>
.parent {
position: absolute;
bottom: 0
height: auto;
}
textarea {
min-height: 52px
height: auto
}
.other {
height: 52px
}
Wrapping textarea
in another div
doesn't change anything.