我有一个单行和2个tds的表。
在每个td中,我使用div并将溢出设置为auto。我的代码在chrome,firefox和IE 8,9,10中运行良好,但在IE 11中无法正常工作。
在正确的情况下,滚动条出现,我可以向下滚动,但在IE 11中没有滚动条。
这是问题所在代码的一部分。
这是我编写的代码的链接。 jsfiddle.net/XrH7f /
代码
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML Transitional//EN">
<META http-equiv="Content-Type" content="text/html; charset=windows-874">
<html>
<head><style>
table
{
border-top-color: #d3dfe2;
border-right-color: #d3dfe2;
border-bottom-color: #d3dfe2;
border-left-color: #d3dfe2;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
border-image-source: none;
border-image-slice: 100%;
border-image-width: 1;
border-image-outset: 0;
border-image-repeat: stretch;
}
table td
{
border-top-color: #d3dfe2;
border-right-color: #d3dfe2;
border-bottom-color: #d3dfe2;
border-left-color: #d3dfe2;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
border-left-style: solid;
border-image-source: none;
border-image-slice: 100%;
border-image-width: 1;
border-image-outset: 0;
border-image-repeat: stretch;
}
td
{
color: #003366;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}
</style></head>
<body text="#000000" topmargin="0" leftmargin="1" bgcolor="#ffffff"><form name="form1" action="page2.jsp" method="POST">
<table width="100%" align="center" bordercolor="#d3dfe2" border="1" cellspacing="0" cellpadding="1">
<tbody>
<tr bgcolor="#ecfefe">
<td width="17%" height="100" align="right" valign="middle">
<div style="width: 100%; height: 100%; overflow: auto;">
Select Make: ALL: <input name="allMake" onclick="selectallMe();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="ALL" /> <br />
Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="BBDC " /> <br />
Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="MBCL " /> <br />
Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="LIQUIDITY " /> <br />
Abcdefghijkl <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="TPH " /> <br />
Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="CGCSL " /> <br />
Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="MB " /> <br />
Abcdef <input name="Make" onclick="selectAllMake();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="CG " /> <br />
>
</td>
<td width="17%" height="100" align="right" valign="middle">
<!-- Here we will place the check Boxes of "Select Make" and "Select Condition" -->
<div style="width: 100%; height: 100%; overflow: auto;">
Select Condition: ALL: <input name="allCondition" onclick="selectAllCn();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="ALL" /> <br />
1<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="DEMO" /> <br />
2<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="NEW " /> <br />
3<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="SOLD" /> <br />
4<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="SR " /> <br />
5<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="WH " /> <br />
6<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="VQC " /> <br />
7<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="PHWH" /> <br />
8<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="PHSR" /> <br />
9<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="DST " /> <br />
10<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="DIS " /> <br />
11<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="DB " /> <br />
12<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="DST2" /> <br />
13<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="FLET" /> <br />
14<input name="Condition" onclick="selectAllCondition();" onchange="changeVisiblityVehicle()" type="checkbox" checked="" value="MS " /> <br />
</div>
</td>
</tr>
</tbody>
</table>
</form></body></html>
答案 0 :(得分:2)
唉唉。终于在一些R&amp; D之后得到了答案。在%中指定div标签的高度会产生问题。将第一个div的高度从100%改为100px和volla !!!!!得到了修复。谢谢你的帮助。
同时将第1个td的vlign属性设置为中间的顶部。