我有下表:
实际上这是一张付款模式在其中的表格<tr>
图在另一个<tr>
和 Grid 在同<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>