This is my code.
div {
background: orange;
height: 200px;
padding: 10px;
}
textarea {
background: lightblue;
border: 5px solid blue;
width: 75%;
height: 50%;
resize: both;
}
<div>
<textarea>foo</textarea>
</div>
When the textarea
is resized to make its height greater than the height of the div
, it overflows outside the div
. Is there a way to make the container div
automatically expand to enclose the larger textarea
when the textarea
is resized to increase its height?