【发布时间】:2013-11-26 20:48:42
【问题描述】:
我需要一些帮助。我尝试了 2 天来制作一个 tbody 可滚动的表格,但我找不到解决方案。
我的桌子是:
<table width=100% style="margin:0 0 0 -1px; border-collapse:collapse;">
<thead>
<tr>
<th ><input type="checkbox" id="select_all" /></th>
<c:forEach items="${grid.heads}" var="element">
<th><c:out value="${element.id}"/></th>
</c:forEach>
</tr>
</thead>
<tbody style="height:200px !important; overflow: auto; display:block;">
<nested:iterate id="row" name="grid" property="data" indexId="cnt">
<tr>
<td><input type="checkbox" name="list_with_checkboxes" value=<c:out value="${row[0]}"/> ></td>
<nested:iterate id="element" name="row">
<td><c:out value="${element}"/> </td>
</nested:iterate>
</tr>
</nested:iterate>
</tbody>
</table>
我的表格已正确呈现,但我无法使 tbody 可滚动,因为我不知道为什么 tbody 的高度为 200px。
有什么想法吗?非常感谢!
【问题讨论】:
标签: jquery html css internet-explorer-8