div一排放四个

dandanlovelove 2009-08-06 08:37:38
<%
sql_top_1="select top 12 * from hotel where op_type like '%"&theclass&"%' order by hots asc,id desc"
set rs_top_1=Server.CreateObject("ADODB.Recordset")
rs_top_1.open sql_top_1,conn,1,1
if (rs_top_1.eof) then
response.write "<td height=30>暂无内容</td>"
else
n=0
rs_top_1.movefirst
do while not rs_top_1.eof
n=n+1
if n=4 then
id1=rs_top_1("id")
end if
if n=4 then
id2=rs_top_1("id")
end if
%>
<div class="movList_li">
<a href="../hotel/show.asp?id=<%=rs_top_1("id")%>" target="_blank" title="<%=rs_top_1("name")%>"><img src="../hotel/top/<%=rs_top_1("url")%>" width="120" height="110" border="0" /></a>
<ul>

<li><a href="show.asp?id=<%=rs_top_1("id")%>" target="_blank"><%=rs_top_1("name")%></a></li>
<li>星级:<%=mystar%></li>
<li>价格:¥团<%=hprice2%>元</li>
<li>位置:<%=left(rs_top_1("address"),8)%></li>
</ul>
</div>
<%if n mod 4=0 then response.write("")
rs_top_1.movenext
loop
end if
rs_top_1.close
set rs_top_1=nothing%>


如何做让它一排放四个?
...全文
168 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
dandanlovelove 2009-08-06
  • 打赏
  • 举报
回复
都说的对
phh1989 2009-08-06
  • 打赏
  • 举报
回复
<style>.movList ul li {float:left;}</style>
孟子E章 2009-08-06
  • 打赏
  • 举报
回复
<style>
.movList{display:inline;width:100px}
</style>

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧