Reputation: 3891
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
Upvotes: 3
Views: 3641
Reputation: 1252
<div style="margin:0 50px 0 160px">
<textarea style="width:100%">123</textarea>
</div>
Here is the code
Upvotes: 3