为什么图片上边有空位置。

nffly 2004-01-16 02:46:59
地址:
http://www.gkestate.com/sm3/chinese/more/doubletc.asp?id=1414&n1=要闻


源码:
<table width="540" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>

<table width="540" border="0" cellspacing="0" cellpadding="0">

<style type="text/css">
<!--
.tcname{line-height:22px}
-->
</style>
<style type="text/css">
<!--
.tmname{line-height:24px}
-->
</style>
<%
id=request("id")
sql1="select * from leaf where id="&id
set rs=server.createobject("adodb.recordset")
rs.open sql1,conn,1,3,1
'response.write a12&"###"&id&sql1
if rs.eof=false then
sql="select * from pic where a1='"&trim(rs("id"))&"'"
set rs1=server.createobject("adodb.recordset")
rs1.open sql,conn,1,3,1
%>
<tr>
<td height="25" align="center"><strong>
<font size="4" color="<%=trim(rs("a12"))%>"><%=rs("a8")%></font></strong></td>
</tr>
<%
'sql1="select * from pic where a1='"&trim(rs("id"))&"'"
'set rs1=server.createobject("adodb.recordset")
'rs1.open sql1,conn,1,3,1
%>

<tr>
<td height="25" align="center"><font color="#000000" ><%if trim(rs("a5"))<>"" then%><strong>作者:</strong><%=trim(rs("a5"))%><%end if%> <%if trim(rs("a6"))<>"" then%><strong>时间:</strong><%=trim(rs("a6"))%><%end if%></font></td>
</tr>
</table></td></tr>
<tr><td valign="top" ><table width="540" border="0">
<tr><td align=center valign="top"> <table border="0">
<%if rs1.eof=false then
rs1.pagesize=2
for i=1 to rs1.pagecount%>
<tr>
<%for j=1 to rs1.pagesize
%> <td width="207" valign="top" align="left">
<A HREF="http://<%=Request.ServerVariables("SERVER_NAME")%>\sm3\loadimgs/<%=rs1("a2")%>" target=_blank>
<IMG SRC="http://<%=Request.ServerVariables("SERVER_NAME")%>\sm3\loadimgs/<%=rs1("a2")%>" WIDTH="200" HEIGHT="127" BORDER=0 ALT="图:<%=trim(i*rs1.pagesize+j)%>"></A>
<%if rs1("jiagk") <> "" then%>
<li><%=rs1("jiagk")%></li><br><br>
<%else%>
<br>
<%end if%>
</td>
<%
rs1.movenext
if rs1.eof=true then
exit for
end if%>

<%next

%>

</tr>
<%
next
%>
<%end if%></table>
</td>

</tr>
<tr><td>
<%end if%><span class="tcname"><FONT COLOR=""><%=rs("a10")%></FONT></span>
</td></tr>
<tr>
<td>
<br><br>
<p align=center>
<input type="button" value="关闭窗口" onClick="self.close();" name="B12">
</p><br><br>
</td>
</tr>
<!--内容结束-->
</table>

<%rs.close
set rs=nothing
rs1.close
set rs1=nothing%>



</td>
</tr>
</table>
...全文
63 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
nffly 2004-01-17
  • 打赏
  • 举报
回复
非常感谢:nik_Amis(Azrael) 。问题解决了。
nik_Amis 2004-01-16
  • 打赏
  • 举报
回复
晕,试着看了一下,不行了,开发太不规范了

nik_Amis 2004-01-16
  • 打赏
  • 举报
回复
碰到这种问题

你可以replace 所有的border=0 为1

然后就很清楚了

你的最最最最里层的一个table也就是先是图片那个
的上一层tr应该 valign=top
  • 打赏
  • 举报
回复
你表格镶嵌得太多了,完全不必要。一个表格就可以容纳。
nffly 2004-01-16
  • 打赏
  • 举报
回复
请大家帮帮忙吧!
nffly 2004-01-16
  • 打赏
  • 举报
回复
不行啊!
  • 打赏
  • 举报
回复
valign=top
xieyj 2004-01-16
  • 打赏
  • 举报
回复
将所有 table 里的height 去掉,加上 cellspacing=0 cellpadding=0 试试

28,407

社区成员

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

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