代码显示大类小类目录,数据显示排列问题
代码如下: <%set rs=server.CreateObject("adodb.recordset")
rs.open "select anclassid,anclass,changyong from shop_anclass where changyong=1 order by anclassidorder",conn,1,1
do while not rs.eof
response.write "<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td colspan=3><div align=center>"
response.write "【"&trim(rs("anclass"))&"】"
response.write "</div></td></tr>"
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select nclassid,nclass,changyong,anclassid from shop_nclass where changyong=1 and anclassid="&rs("anclassid")&" order by nclassidorder",conn,1,1
do while not rs2.eof
Dim num1 '//判断数字奇偶
num=0
num1 = Num1+1
If num1 Mod 2 = 0 Then
response.write "<td width=70><div align=left><a href=class.asp?aid="&rs2("anclassid")&"&nid="&rs2("nclassid")&">"&trim(rs2("nclass"))&"</a></div></td></tr>"
else
response.write "</tr><td width=70><div align=right><a href=class.asp?aid="&rs2("anclassid")&"&nid="&rs2("nclassid")&">"&trim(rs2("nclass"))&"</a></div></td>"
response.write "<td width=12><div align=center><FONT color=#ff6600></FONT></div></td>"
end if
rs2.movenext
loop
rs2.close
set rs2=nothing
response.write "</table>"
rs.movenext
loop
rs.close
set rs=nothing%>
第一个分类,第二个分类都没问题,都是左右居中显示,第三个分类第一个小类突然飘到这行的最右边。出现一边三个数据,另一边才一个数据,并且不对称显示。各位大侠求解啊感激不尽······示意图如下:
手机
黑莓 | ip4s
moto | htc
MP3
原道
魅族 | 纽曼
QQ
猫猫
黑猫
白猫 | 黄猫
死猫
------解决方案--------------------
可能 html结构或者css有问题,把html贴出来看看