0

次の表があります。

ここに画像の説明を入力

実はこれは支払いモードが一つになった表です<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>
4

1 に答える 1

0

次のようにグリッドビューの上に設定margin-right:100pxすることでこれを行いました。

<td align="left" valign="top" style="margin-right:100px" >
于 2013-08-03T09:46:24.297 に答える