-4

我似乎无法减少两个 TR 标签之间的空间。我有以下代码。我不希望两个 tr 标签之间有任何空格。

    <table width="100%" cellpadding="0" cellspacing="0" border="0" style="background-        color:#d7d6d4" > 
    <tr   > 
    <td align="center" style="height:0px; line-height:0px; background:#932a28;         border:0; border-bottom:0"> 
              <asp:Image ID="newLogo" runat="server"  ImageUrl="~/images/middle_logo_top.jpg"/> 

    </td> 

</tr> 

<tr > 
    <td  align="center" style="height:10px;  background:#e5e0dd"> 
         <asp:Image ID="Image1" runat="server" ImageUrl="~/images/middle_logo_btm.jpg"/> 


    </td> 
</tr>

4

2 回答 2

0

不确定您要问什么 - 删除标记中的空格或删除浏览器表示的标记中的空格?

如果是后者,你最好学习一些 CSS,那么你可以删除内联样式,停止使用表格进行布局,并将display:block和其他助手附加到对象上,以掌握你的演示工作......

<style type="text/css">

   div , div img { display:block }
   .fl { float:left; }

</style>

<div class="fl"><img src="image1.jpg alt=""/></div>
<div class="fl"><img src="image2.jpg alt=""/></div>

和你的桌子一样,可能会解决空间问题

于 2012-05-15T19:45:33.560 回答
0

我认为您应该使用 CSS 进行布局并停止使用表格。

看看这个:http ://sixrevisions.com/web-standards/20-html-best-practices-you-should-follow/

于 2012-05-15T19:48:20.580 回答