我有,我動態填充使用下拉列表asp.net 2名複選框列表,數限制,現在都加滾動
在申報單,一個包含了所有水果的名稱和一個含有隻有特定箱子裏的水果名稱。
如果我的複選框列表中有很多項目,那麼它溢出了div,有什麼方法可以修復它嗎?
這是標記
<div class="list1">
<asp:Label ID="Label3" runat="server" Text="Available fruits" />
<asp:CheckBoxList ID="CheckBoxList1" runat="server" AutoPostBack="true" />
</div>
<div class="list2">
<asp:Label ID="Label4" runat="server" Text="fruits in a crate" />
<asp:CheckBoxList ID="CheckBoxList2" runat="server" AutoPostBack="true" />
</div>
CSS
.list1
{
clear: both;
float: left;
width: 290px;
height: 190px;
overflow-y:scroll;
}
.list2
{
float:right;
width: 290px;
height: 190px;
overflow-y:scroll;
}
更新
我嘗試添加這DIV類overflow-y:scroll;
和overflow:scroll;
我也把我的複選框列表到獨立div和a沉溺在上面但沒有收穫,只有痛苦先生。
爲什麼dindt聲明任何HIGHT – DiederikEEn 2013-05-13 11:37:46
我不得不改變我的問題,對不起 – Mathematics 2013-05-13 11:48:04
MH你可以添加一個最大高度:100%; ? – DiederikEEn 2013-05-13 11:48:44