asp分列显示问题 急!

来源:百度知道 编辑:UC知道 时间:2024/05/20 09:09:20
用了以下的代码,可还是单列显示
<table width="422" height="187" border="0" cellpadding="0" cellspacing="0" background="img/bg014.gif">
<tr>
<td height="262" align="center" valign="top"> <br style="line-height:4px">
<table width="99%" border="0" cellpadding="3" cellspacing="0" background="img/bg023.gif" id=pNewsList1

style="DISPLAY: block" >
<%

i=1

sql = "select top 20* from a_news where x_lei = '时尚装饰' order by id desc"
set rs = conn.execute(sql)

do while not rs.eof or bof
id = rs("id")
title = rs("title")

If i Mod 2=0 Then
Response.Write "<tr></tr>"
End If
i = i + 1

感觉你的表格嵌套好乱,

<table width="99%" border="0" cellpadding="3" cellspacing="0" background="img/bg023.gif" id="pNewsList1" style="DISPLAY: block" >
<%
sql = "select top 20 * from a_news where x_lei = '时尚装饰' order by id desc"
set rs = conn.execute(sql)
do while not rs.eof or bof
%>
<tr>
<td width="2%" height="24" class="zhongxiahua"><font color="#006600">·<%=rs("id")%></font></td>
<td width="175" class="zhongxiahua"><a href="news/news_jt.asp?id=<%=id%>" target="_blank" title="<%=title%>"> <%=left(title,14)%></a></td>
</tr>
<%
rs.movenext
loop
%>
</table>

只是让标题分两列吗
<tr>

<td width="2%&quo