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

如何消除图片与表格间的间隙

2012-03-28 
怎么消除图片与表格间的间隙?怎么消除图片与表格间的间隙?img src4.gif width100% /table border

怎么消除图片与表格间的间隙?
怎么消除图片与表格间的间隙?
  <img src="4.gif" width="100%" />
  <table border="0" cellspacing="0" cellpadding="0" width="1032"align="center" background="http://www.poet2010.org/images/toupiao/258.jpg" >
指的是这边图片与表格的间隙 总是有很小的间隙 不知道怎么除掉 谢谢啦




下面是代码
<!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={dede:global.cfg_soft_lang/}" />
<title></title>
<meta name="keywords" content="{dede:field.keywords/}" />
<meta name="description" content="{dede:field.description function='html2text(@me)'/}" />
<link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" />
<script language='javascript' type='text/javascript'>
function checkSubmit(){
if(document.feedback.msg.value!='') document.feedback.submit();
else alert("评论内容不能为空!");
}
function check(){
if(document.formsearch.searchtype.value=="")
document.formsearch.action="http://www.google.cn/custom"
else
document.formsearch.action="{dede:field name='phpurl'/}/search.php"


</script>
<link rel="stylesheet" href="toupiao2.css" type="text/css" />
<body background="http://www.poet2010.org/images/toupiao/bg5.jpg">
<form name='voteform' method='post' action='/plus/vote.php' target='_blank' >
  <div align="center">
  <input type='hidden' name='dopost' value='send' />
  <input type='hidden' name='aid' value='2' />
  <input type='hidden' name='ismore' value='0' />
  </head>
  <img src="4.gif" width="100%" />
  <table border="0" cellspacing="0" cellpadding="0" width="1032"align="center" background="http://www.poet2010.org/images/toupiao/258.jpg" >
  <tr>
  <td height="150"><img src="file:///D|/Backup/我的文档/My Pictures/T-MAC/s_488183.jpg" alt="small product photo" width="150" height="150" border="0" /></td>
  <td width="1%">&nbsp;</td>
  <td height="150"><img src="file:///D|/Backup/我的文档/My Pictures/T-MAC/thumb_280110b06e08deefcd4b38fd455afe58.jpg" alt="small product photo" width="160" height="150" border="0" /></td>
  <td width="1%">&nbsp;</td>
  <td height="150"><img src="file:///D|/Backup/我的文档/My Pictures/T-MAC/200791721115689785.jpg" alt="small product photo" width="160" height="150" border="0" /></td>
  <td width="1%">&nbsp;</td>
  <td height="150"><img src="file:///D|/Backup/我的文档/My Pictures/T-MAC/thumb_280110b06e08deefcd4b38fd455afe58.jpg"alt="small product photo" width="160" height="150" border="0" /></td>
  <td width="1%">&nbsp;</td>
  <td height="150"><img src="file:///D|/Backup/我的文档/My Pictures/T-MAC/20080514_ce3cb114bdfee7ce95f8TwWBhGgExkw4.jpg" alt="small product photo" width="150" height="150" border="0" /></td>


  </tr>
  <tr>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="http://www.poet2010.org/">00</a><br />
  <input type='radio' name='voteitem' value='1' />
  </p> </td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='2' />
  </p></td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='3' />
  </p></td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='4' />
  </p></td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='5' />
  </p></td>
  </tr>
  <tr>
  <td height="150"><img src="file:///E|/网赚/建站/工具/Dreamweaver8-chs/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_product_sm.gif" alt="small product photo" width="150" height="150" border="0" /></td>
  <td>&nbsp;</td>
  <td height="150"><img src="file:///E|/网赚/建站/工具/Dreamweaver8-chs/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_product_sm.gif" alt="small product photo" width="160" height="150" border="0" /></td>
  <td>&nbsp;</td>
  <td height="150"><img src="file:///E|/网赚/建站/工具/Dreamweaver8-chs/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_product_sm.gif" alt="small product photo" width="160" height="150" border="0" /></td>
  <td>&nbsp;</td>
  <td height="150"><img src="file:///E|/网赚/建站/工具/Dreamweaver8-chs/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_product_sm.gif" alt="small product photo" width="160" height="150" border="0" /></td>
  <td>&nbsp;</td>
  <td height="150"><img src="file:///E|/网赚/建站/工具/Dreamweaver8-chs/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_product_sm.gif" alt="small product photo" width="150" height="150" border="0" /></td>
  </tr>
  <tr>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='6' />
  </p></td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='7' />


  </p></td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='8' />
  </p></td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='9' />
  </p></td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='10' />
  </p></td>
  <tr>
  <td height="150"><img src="file:///E|/网赚/建站/工具/Dreamweaver8-chs/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_product_sm.gif" alt="small product photo" width="150" height="150" border="0" /></td>
  <td>&nbsp;</td>
  <td height="150"><img src="file:///E|/网赚/建站/工具/Dreamweaver8-chs/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_product_sm.gif" alt="small product photo" width="160" height="150" border="0" /></td>
  <td>&nbsp;</td>
  <td height="150"><img src="file:///E|/网赚/建站/工具/Dreamweaver8-chs/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_product_sm.gif" alt="small product photo" width="160" height="150" border="0" /></td>
  <td>&nbsp;</td>
  <td height="150"><img src="file:///E|/网赚/建站/工具/Dreamweaver8-chs/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_product_sm.gif" alt="small product photo" width="160" height="150" border="0" /></td>
  <td>&nbsp;</td>
  <td height="150"><img src="file:///E|/网赚/建站/工具/Dreamweaver8-chs/Dreamweaver%208/Configuration/BuiltIn/StarterPages/mm_product_sm.gif" alt="small product photo" width="150" height="150" border="0" /></td>
  </tr>
  <tr>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='11' />
  </p></td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='12' />
  </p></td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='13' />
  </p></td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='14' />


  </p></td>
  <td>&nbsp;</td>
  <td valign="top" class="bodyText" nowrap="nowrap"><a href="javascript:;">00</a><br />
  <input type='radio' name='voteitem' value='15' />
  </p></td>
  </tr>
  </table>
  </div>
  <p align="center">
<input type='submit' style='width:60px;background-color:#EDEDE2;border:1px dotted #818279' name='vbt1' value='投票' />
<input type='button' style='width:80px;background-color:#EDEDE2;border:1px dotted #818279' name='vbt2' value='查看结果' onClick="window.open('/plus/vote.php?dopost=view&aid=2');" /></form>
</p>

</body>
</html>

[解决办法]
还有一种就是在Table添加cellspacing="0" cellpadding="0" ,楼主这个已经有了
[解决办法]
在IE6里面这么写确实会有一个细小的缝隙。你可以这样试试:
<img src="" /><table><tr>……</tr></table> 连起来写,不要写完<img />之后回车再写<table></table>。写在一行里试试。

热点排行