在jsp中怎么固定div大小,当超出时出现滚动条
这是我的代码:<tablewidth="70%"border="0"align="center"><tr><td><FIELDSETstyle="width:100%;"...
这是我的代码:
<table width="70%" border="0" align="center">
<tr>
<td>
<FIELDSET style="width: 100%;">
<LEGEND>
关系配置
</LEGEND>
<DIV class="InfoArea" id="tabPane1" align="center">
<table align="center" height="250px" >
<tr>
</tr>
<tr>
<td nowrap>
业务环节:
</td>
<td>
<input type="hidden" name="linkOrderId" value="">
<img class="refButtonClass" onclick="open_window_link()" src="<%=request.getContextPath()%>/images/select_blue.gif"><input class="text_field_reference_readonly" type="text" name="linkName" value="" readonly="">
</td>
</tr>
<tr>
<td>
业务环节列表
</td>
</tr>
<div style="width:50px;height:50px;overflow:auto;">
<table >
<c:forEach var="pro" items="${list}">
<c:if test="${not empty pro}">
<tr class="nav">
<td align="center">
<input type="checkbox" name="linkId"
value="${pro.linkId}" checked/>
</td>
<td align="center">
业务环节名称:
</td>
<td align="center">
${pro.linkName}
</td>
<td align="center">
</td>
<td>
</td>
<td>
</td>
</tr>
</c:if>
</c:forEach>
</table>
</div>
</table>
<br />
</DIV>
</FIELDSET>
</td>
</tr>
</table>
我的代码格式本来挺规范的,但是一粘到这里边就乱了。不好意思
然后主要就是<div style="width:50px;height:50px;overflow:auto;">这段,不知道为什么我试了不管用 展开
<table width="70%" border="0" align="center">
<tr>
<td>
<FIELDSET style="width: 100%;">
<LEGEND>
关系配置
</LEGEND>
<DIV class="InfoArea" id="tabPane1" align="center">
<table align="center" height="250px" >
<tr>
</tr>
<tr>
<td nowrap>
业务环节:
</td>
<td>
<input type="hidden" name="linkOrderId" value="">
<img class="refButtonClass" onclick="open_window_link()" src="<%=request.getContextPath()%>/images/select_blue.gif"><input class="text_field_reference_readonly" type="text" name="linkName" value="" readonly="">
</td>
</tr>
<tr>
<td>
业务环节列表
</td>
</tr>
<div style="width:50px;height:50px;overflow:auto;">
<table >
<c:forEach var="pro" items="${list}">
<c:if test="${not empty pro}">
<tr class="nav">
<td align="center">
<input type="checkbox" name="linkId"
value="${pro.linkId}" checked/>
</td>
<td align="center">
业务环节名称:
</td>
<td align="center">
${pro.linkName}
</td>
<td align="center">
</td>
<td>
</td>
<td>
</td>
</tr>
</c:if>
</c:forEach>
</table>
</div>
</table>
<br />
</DIV>
</FIELDSET>
</td>
</tr>
</table>
我的代码格式本来挺规范的,但是一粘到这里边就乱了。不好意思
然后主要就是<div style="width:50px;height:50px;overflow:auto;">这段,不知道为什么我试了不管用 展开
2个回答
展开全部
改成这样:
<table width="70%" border="0" align="center">
<tr>
<td><FIELDSET style="width: 100%;">
<LEGEND> 关系配置 </LEGEND>
<DIV class="InfoArea" id="tabPane1" align="center">
<table align="center" height="250px" >
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td nowrap> 业务环节: </td>
<td><input type="hidden" name="linkOrderId" value="">
<img class="refButtonClass" onclick="open_window_link()" src="<%=request.getContextPath()%>/images/select_blue.gif">
<input class="text_field_reference_readonly" type="text" name="linkName" value="" readonly=""></td>
</tr>
<tr>
<td> 业务环节列表 </td>
<td><div style="width:50px;height:50px;overflow-y:auto;overflow-x:hidden;">
<table >
<c:forEach var="pro" items="${list}">
<c:if test="${not empty pro}">
<tr class="nav">
<td align="center"><input type="checkbox" name="linkId"
value="${pro.linkId}" checked/></td>
<td align="center"> 业务环节名称: </td>
<td align="center"> ${pro.linkName} </td>
<td align="center"></td>
<td></td>
<td></td>
</tr>
</c:if>
</c:forEach>
</table>
</div></td>
</tr>
</table>
<br />
</DIV>
</FIELDSET></td>
</tr>
</table>
<table width="70%" border="0" align="center">
<tr>
<td><FIELDSET style="width: 100%;">
<LEGEND> 关系配置 </LEGEND>
<DIV class="InfoArea" id="tabPane1" align="center">
<table align="center" height="250px" >
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td nowrap> 业务环节: </td>
<td><input type="hidden" name="linkOrderId" value="">
<img class="refButtonClass" onclick="open_window_link()" src="<%=request.getContextPath()%>/images/select_blue.gif">
<input class="text_field_reference_readonly" type="text" name="linkName" value="" readonly=""></td>
</tr>
<tr>
<td> 业务环节列表 </td>
<td><div style="width:50px;height:50px;overflow-y:auto;overflow-x:hidden;">
<table >
<c:forEach var="pro" items="${list}">
<c:if test="${not empty pro}">
<tr class="nav">
<td align="center"><input type="checkbox" name="linkId"
value="${pro.linkId}" checked/></td>
<td align="center"> 业务环节名称: </td>
<td align="center"> ${pro.linkName} </td>
<td align="center"></td>
<td></td>
<td></td>
</tr>
</c:if>
</c:forEach>
</table>
</div></td>
</tr>
</table>
<br />
</DIV>
</FIELDSET></td>
</tr>
</table>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询