如何在页面中让图片排列显示
前两天弄一个网页,功能就是将产品图片显示出来,但问题来了,做好后发现图片不是像别的网站的页面一样图片是一排三个或者四个那样显示,而是一排显示一个图片,我想按那样显示,一排显示四个图片,可不知道怎么做了,有人能帮忙看一下吗,实在是代码苦手啊- -
代码如下
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<meta content="MSHTML 6.00.2900.5803" name="GENERATOR"/>
<title></title>
<link href="css/layout.css" rel="stylesheet" type="text/css" />
<!--#include file="vars.asp" -->
<!--#include file="conn.asp" -->
</head>
<body bgcolor="#621308">
<div id="container">
<!--#include file="top.asp" -->
<br class="clearfloat" />
<div id="mainContent">
<div id="sidebar1"><table width="229" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="229">
<div id="title1"><img src="image/iocn4.GIF" height="35" width="229" /></div>
<div id="kl1">
<ul>
<%set rs= Server.CreateObject("adodb.recordset")
if pid=0 then
sql="select * from zm_Pro_Type where pid=0 order by ord asc"
else
sql="select * from zm_pro_type order by id desc"
end if
rs.open sql,conn,1
while not rs.eof
%>
<li><img src="image/iocn5.gif" /> <a href="?fid=<%= rs("id") %>"><%= rs("name") %></a><br />
</li>
<hr />
<% rs.movenext
wend
rs.close
%>
</ul>
</div>
<div id="title1"><img src="image/iocn0.gif" height="35" width="229" /></div>
<div id="kl2"><p>地址:</p> <p>电话:</p></div></td>
</tr>
</table>
</div>
<div id="content">
<table width="96%" height="563" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="middle" height="30"><img src="showpicture_iconmain.gif" height="30" width="30"/> <span id="spanmenu"> 新 品 推 荐</span> </td>
</tr>
<tr>
<td valign="center" height="10"><hr size="1" /></td>
</tr>
<tr>
<td align="center" valign="top"></td>
</tr>
<tr height="528">
<td valign="top">
<table align="center">
<tr align="middle" valign="center">
<td width="165" align="left" valign="center" b="">
<%set rs= Server.CreateObject("adodb.recordset")
if Trim(Request.QueryString("fid"))="" then
sql="select * from zm_Pro order by id desc"
else
fid=Trim(Request.QueryString("fid"))
sql="select * from zm_pro where tid=" & fid & " order by id desc"
end if
rs.open sql,conn,1
rs.pagesize=12'每页显示多少条
pagecount=rs.pagecount '总页数
if rs.bof and rs.eof then
response.write ""
else
' Response.Write(":::" & clng(request.querystring("page")))
page=clng(request.querystring("page"))
if page<1 then page=1
if page>rs.pagecount then page=rs.pagecount
rs.absolutepage=page '跳到多少页
for i=1 to rs.pagesize
%>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="148">
<tr>
<td align="middle" width="166"><table bgcolor="#000000" border="0" cellpadding="0" cellspacing="1">
<tr>
<td align="middle" bgcolor="#ffffff"><a href="showpro.asp?id=<%= rs("id") %>&flag=<%=flag
%>"><img src="uploadimages\<%=rs("img") %>" alt="" name="uu" width="145" height="147" border="0" /></a></td>
</tr>
</table></td>
</tr>
<tr>
<td align="middle" height="30"><a href="showpro.asp?id=<%= rs("id") %>&flag=<%=flag
%>"><%= rs("name") %></a></td>
</tr>
</table>
<% rs.movenext
if rs.eof then exit for
next
end if
%>
</td>
</table>
</td>
</tr>
<tr height="25"><td align="center"> <span style="color:#666666">[共<%=rs.pagecount%>页 当前第<%=page%>页 <%
if rs.pagecount<=1 then
Response.Write("首页 ")
Response.Write ("上一页 ")
Response.Write ("下一页 ")
Response.Write ("尾页 ")
else
Response.Write("<a href='?Page=1&fid=" & fid &"' class='list'>首页</a> ")
Response.Write("<a href='?Page=" & (Page-1) & "&fid="&fid&"' class='list'>上一页</a> ")
Response.Write("<a href='?Page=" & (Page+1) & "&fid="&fid&"' class='list'>下一页</a> ")
Response.Write("<a href='?Page=" & rs.pagecount & "&fid="&fid&"' class='list'>尾页</a> ")
end if
rs.close
%>]</span></td></tr>
</table>
</div>
</div>
<br class="clearfloat" />
<!--#include file="boot.asp" -->
</div></body></html>