Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

css textarea size

Tags:

css

My goal is to have a text area that automatically resizes to whatever horizontal space is available after margins. Basically I am trying to align 160px on the left margin 50px on the right margin and then the textarea fills in the rest. Ive tried auto. I have also tried multiple combinations of positions, displays, nesting divs, and more. So far I have not been able to set the textarea to automatically fill the left and right space that is available. How can I accomplish this?

edit: it needs to fill the document width

like image 779
Drake Avatar asked Mar 17 '26 19:03

Drake


1 Answers

<div style="margin:0 50px 0 160px">
   <textarea style="width:100%">123</textarea>
</div>

Here is the code

like image 153
avetarman Avatar answered Mar 19 '26 09:03

avetarman