首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

呼唤CSDN高手,怎么将这个一行两列改为一行三列

2012-03-09 
呼唤CSDN高手,如何将这个一行两列改为一行三列?呼唤CSDN高手,如何将这个一行两列改为一行三列?tablewidth

呼唤CSDN高手,如何将这个一行两列改为一行三列?
呼唤CSDN高手,如何将这个一行两列改为一行三列?
<table   width= "50% "   border= "0 "   cellpadding= "0 "   cellspacing= "0 ">
                                                    <tr   align= "center ">
<%
sql= "select   top   6   s_name,id   from   info_shop   where   ifhome=1   and   ifvalid=1   order   by   id   desc "
rs.open   sql,conn,1,1
sn=0
If   not   rs.eof   Then
do   while   not   rs.eof  
sid=rs( "id ")  
set   rs2=server.createobject( "adodb.recordset ")
sqltt= "select   top   1   sid,id,disc   from   dazhe_info   where   sid= ' "&sid& " '   order   by   id   desc "
rs2.open   sqltt,conn,1,1
set   rs1=server.createobject( "adodb.recordset ")
sqlt= "select   top   1   sid,spic     from     pic_shop   where   sid= ' "&sid& " '   order   by   id   desc "
rs1.open   sqlt,conn,1,1
sn=sn+1
%>  

                                                <td>
<table   width= "100 "   cellspacing= "0 "   cellpadding= "0 "   style= "border:0px   solid   #EDE8D1; " <%if   sn   mod   2=0   then   response.write   "align=center "%> >
                                                                                                        <td   width= "100 "   height= "90 "   align= "center "> <%if   not   rs2.eof   then%> <a   href= "show.asp?id= <%=rs2( "id ")%> "   target= "_blank "> <%else%> <a   href= "show.asp?id= <%=rs( "id ")%> "   target= "_blank "> <%end   if%> <%if   not   rs1.eof   then%> <img   src= 'imgweb/ <%=rs1( "spic ")%> '   width= "95 "   height= "75 "   border= "0 "   style= "border:1px   solid   #CCC; ">
                                                            <%else%> <img   src= 'imgweb/noimg.gif '   width= "95 "   height= "75 "   border= "0 ">
                                                            <%end   if%>
                                                                                                                <%if   not   rs2.eof   then%>


                                                            <a   href= "show.asp?id= <%=rs2( "id ")%> "   target= "_blank ">
                                                            <%else%>
                                                            <a   href= "show.asp?id= <%=rs( "id ")%> "   target= "_blank ">
                                                            <%end   if%>
                                                      <font   color= "#FF3300 "> <%=rs( "s_name ")%> </font> </a> </td>
                                                                                                                                              </table>
<%
rs1.close
rs2.close
if   sn   mod   2   =0   then  
response.write   " <tr> "
end   if  
rs.movenext
loop%>    

                                        </table>


现在问题为显示的信息为一行只有两列,两个以后就自动换行了,我想把它改成一行三列,请问高手应该怎么改,感谢你的指导!

[解决办法]
if sn mod 3 =0 then

热点排行