ASP.net GridView边距

时间:2009-08-04 15:33:26

标签: asp.net css

如何设置从ASP.net GridView生成的HTML表的margin-left属性?

1 个答案:

答案 0 :(得分:5)

<asp:GridView id="hurfDurf" style="margin-left:10%;" runat="server">
</asp:GridView>

或者,在您的aspx页面顶部...

<head>
    <style type="text/css">
    #hurfDurf table
    {
        margin-left:10px;
    }
    </style>
</head>