Reputation: 455
I have a div containing a textarea
element.
And I need to give it the right vertical size.
The container Div have right size. (100%)
I want to give a min-height or min rows, to provide a scroll if necessary, and a height of 100% (the 100 % of div).
I can't. I don't know how to do this. I need an example.
Upvotes: 9
Views: 28427
Reputation: 6162
The very basic example is
<html>
<body>
<div style="height:100%;border:1px solid green;">
<textarea style="min-height:100px;height:100%;width:100%;border:1px solid red;"></textarea>
</div>
</body>
Borders are only to show dimensions. But in your case it might be more complicated. Please look at the definition of a containing block and height calculation.
Upvotes: 10