Q:

how can i set asp.net gridview to center of div?

I have a asp.net grid view,and i want this gridview show center of the div,i write this css and html code:
<div style="color: #FFFFFF;" class='center' >

        شرکت هایی که درمعاونت تجاری ثبت نشده اند<br />
        <br />
        <asp:GridView ID="GridView1" runat="server" BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" CellPadding="2" ForeColor="Black" GridLines="None">
            <AlternatingRowStyle BackColor="PaleGoldenrod" />
            <FooterStyle BackColor="Tan" />
            <HeaderStyle BackColor="Tan" Font-Bold="True" />
            <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
            <SortedAscendingCellStyle BackColor="#FAFAE7" />
            <SortedAscendingHeaderStyle BackColor="#DAC09E" />
            <SortedDescendingCellStyle BackColor="#E1DB9C" />
            <SortedDescendingHeaderStyle BackColor="#C2A47B" />
        </asp:GridView>

    </div>

and center css is:
.center {

            width:800px;
            border-radius: 5px;

            width: 60%; 
            height:200px; 
            margin: 0 auto;
            }​

but gridview show this:

how can i solve that?thanks.

A:

Add align="center" in 
Like this 
<div align="center" style="color: #FFFFFF;" class='center' >

And remove extra style from .center class. You have assigned width 2 time. % and px.

