【发布时间】:2012-11-28 14:49:44
【问题描述】:
我有 textarea 和一个存放该 textarea 的 DIV 容器。
<div class="holder">
<div style="float:left;">
<img src="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc6/211204_417552211638405_1828134258_q.jpg">
</div>
<div style="float:left;">
<textarea class="grow" row="5" cols="20"></textarea>
</div>
</div>
我正在使用自动增长插件。
$(document).ready(function(){
$(".grow").autogrow();
});
当 textarea 根据内容调整大小时,容器 div 不会相应扩展。 我尝试添加
Height: 100%;
但这不起作用,我看到它的浮动属性导致问题,但我不知道如何使它与浮动属性一起工作。
Demo Here
【问题讨论】:
-
你确定有问题吗?我在 Google Chrome 23.x 中查看了您的示例