日期:2014-05-17  浏览次数:20898 次

求大婶指点,关于两个表上对齐
想让两个表在水平位置对齐。在网上找了些资料,在静态页面可以实现,但不知道为什么用动态表的时候还是下对齐。
<table bgcolor="#CCCCCC" cellspacing=1 cellpadding=5 width=100%>
<tr valign="top">
<td valign="top">
<div style="float:left;">
<%=request.getAttribute("subuserid")%>的设备
<table bgcolor="#CCCCCC" cellspacing=1 cellpadding=5 width="438"
height="61">
<tr bgcolor="#DDDDDD" valign="top">
<th>
设备MAC
</th>
<th>
设备名称
</th>
<th>
操作
</th>
</tr>
<c:forEach var="sdevice" items="${sessionScope.subdevicelist}">
<tr bgcolor="#EEEEEE" valign="top">
<th>
${sdevice.DeviceMac}
</th>
<th>
${sdevice.DeviceName}
</th>
<th>
<a
href="/Scs_system/userManager.do?par=deleteSubUserDev&deviceMac=${sdevice.DeviceMac}&table=2">删除</a>
</th>
</tr>
</c:forEach>
</table>
共有${sessionScope.count1}条记录&nbsp;当前${sessionScope.nowPage1}/${sessionScope.pageNum1}页
<A
href="/Scs_system/userManager.do?par=gotoAccreditSub&nowPage1=${sessionScope.nowPage1-1}&table=2&subuserid=<%=request.getAttribute("subuserid")%>"
title="上一页" class="nobar">上一页</A>
<A
href="/Scs_system/userManager.do?par=gotoAccreditSub&nowPage1=${sessionScope.nowPage1+1}&table=2&subuserid=<%=request.getAttribute("subuserid")%>"
title="下一页" class="nobar">下一页</A>
</div>
</td>

<br>
<br>
<td valign="top">
<div style="float:left;">
我的设备
<table bgcolor="#CCCCCC" cellspacing=1 cellpadding=5 width="438"
height="61">
<tr bgcolor="#DDDDDD" valign="top">
<th>
设备MAC
</th>
<th>
设备名称
</th>
<th>
操作
</th>
</tr>
<c:forEach var="device" items="${sessionScope.devicelist}">
<tr bgcolor="#EEEEEE" valign="top">
<th>
${device.DeviceMac}
</th>
<th>
${device.DeviceName}
</th>
<th>
<a
href="/Scs_system/userManager.do?par=addDeviceToSub&deviceMac=${device.DeviceMac}">添加给子用户</a>
</th>
</tr>
</c:forEach>
</table>
共有${sessionScope.count2}条记录&nbsp;当前${sessionScope.nowPage2}/${sessionScope.pageNum2}页
<A
href="/Scs_system/userManager.do?par=gotoAccreditSub&nowPage2=${sessionScope.nowPage2-1}&table=3"
title="上一页" class="nobar">上一页</A>
<A
href="/Scs_system/userManager.do?par=gotoAccreditSub&nowPage2=${sessionScope.nowPage2+1}&table=3"
title="下一页" class="nobar">下一页</A>
<c:if test="${requestScope.error == '0'}">
不能重复添加
</c:if>
</div>
</td>
</tr>
</table>
------解决方案--------------------
这种情况,适合用UL代替TABLE.
------