Seeking assistance with a challenge I have encountered and unsure how to resolve. Any help would be greatly appreciated!
The issue at hand is as follows:
I am currently working on a textarea. My goal is to have the input box start with a height of 36px, but as text is inputted, the height of the box should expand to 72px. However, the maximum height should be capped at 72px and not increase further with additional text input.
The above is what I am aiming to achieve. As I am still new to programming, I am unsure if this can be accomplished through CSS alone or if JavaScript is required. How can I fulfill this requirement using JavaScript?
Thank you to everyone who takes the time to read my question and offer assistance. Your help is much appreciated.
Code Snippet:
body {
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
... (remaining CSS code)
<div class="demo">
<div class="wrap">
<ul class="tool">
<li>photo</li>
<li>file</li>
<li>example</li>
</ul>
<textarea class="chat"></textarea>
<div class="tool__footer">
<input type="checkbox" id="enter"><label for="enter">ENTER</label>
<a type="text" class="send" href="javascript:;">send</a>
</div>
</div>
</div>