0

I have a Textarea box inside of div. however when I drag the textarea and push it down. Div start to mask all the contents. Is any way to expand div's heigh when user try to drag textarea down. Can I do it in css or do I need javascript or jquery?

<div style="height:400px; width:200px; background:yellow; overflow:hidden"> 
    <textarea style="widht:150; height:200px;"></textarea>       
</div>

http://jsfiddle.net/y9hy9/

4

1 回答 1

1

http://jsfiddle.net/DEgEw/1/

<div style="min-height:400px; min-width:200px; background:yellow; width: auto; display: inline-block; overflow:hidden"> 
    <textarea style="widht:150; height:200px;"></textarea>       
</div>

我建议使用 min-height 和 min-width 而不是固定的高度和宽度。还显示:inline-block 将调整宽度以适应 textarea,您可以随时添加 br 标签以防止其他 div 在您的包装 div 旁边

于 2013-05-27T15:47:50.830 回答