2013-08-03 34 views
0

我有如下表:表的項目和表格邊框去掉空格

enter image description here

其實這是在付款方式是在一個<tr>

圖在另一<tr>

與格中相同<tr>另一個<td>

我只是想刪除網格和表格邊框之間的額外空間。

對於這個我把網格分爲不同的寬度,但空間總是伴隨着它。 (正如我在紅色標記中提到的那樣)。

我該如何刪除該空間?

請幫幫我。下面

爲了更清楚是我的表結構代碼:

<table cellpadding="0" cellspacing="0" width="25%"> 
    <tr> 
     <td align="left" class="NormalText" colspan="2" style="font-weight: bold"> 
      By Payment mode 
     </td> 
    </tr> 
    <tr> 
     <td align="left" style="width: 30%" valign="top"> 
      <asp:Label ID="LblChartMonthTransPaywise" runat="server"></asp:Label> 
     </td> 
     <td align="left" valign="top" > 
      <asp:GridView ID="GrdChartMonthTransPaywise" runat="server" AutoGenerateColumns="false" 
       CellPadding="2" CellSpacing="2" ShowFooter="true" ShowHeader="false" Width="100%"> 
       <RowStyle CssClass="NormalText" VerticalAlign="Top" /> 
       <Columns> 
        <asp:TemplateField> 
         <ItemTemplate> 
          <%#Eval("PaymentMode")%> 
         </ItemTemplate> 
         <FooterTemplate> 
          Total: 
         </FooterTemplate> 
         <FooterStyle CssClass="NormalText" Font-Bold="true" HorizontalAlign="Right" /> 
         <ItemStyle Width="40%" /> 
        </asp:TemplateField> 
        <asp:TemplateField> 
         <ItemTemplate> 
          <asp:Label ID="LblAmt" runat="server" CssClass="NormalText"></asp:Label> 
         </ItemTemplate> 
         <ItemStyle HorizontalAlign="Right" Width="30%" /> 
         <FooterTemplate> 
          <asp:Label ID="LblFootAmt" runat="server" CssClass="NormalText" Font-Bold="true"></asp:Label> 
         </FooterTemplate> 
         <FooterStyle HorizontalAlign="Right" Width="30%" /> 
        </asp:TemplateField> 
        <asp:TemplateField> 
         <ItemTemplate> 
          <asp:Label ID="LblAmtPercentage" runat="server" CssClass="NormalText"></asp:Label> 
         </ItemTemplate> 
         <ItemStyle HorizontalAlign="Right" /> 
        </asp:TemplateField> 
       </Columns> 
      </asp:GridView> 
     </td> 
    </tr> 
</table> 
+0

剛剛成立與70%,第二個TD .. – Raghubar

+0

@Raghubar先生,我做到了,但請告訴我任何技術,我怎麼能帶來100除了100i.e.該標誌%它的另一行,我想要避免它(網格的第三列) –

+0

最好提供生成的HTML代碼的能力來使用沙箱,如jsfiddle – Anton

回答

0

我通過上面的GridView設置margin-right:100px到如下做到了這一點。

<td align="left" valign="top" style="margin-right:100px" >