title: How can i place Gridview center of div or panel.?
body: <p>Hello!
  Can anyone tell me how can I place any <code>Gridview</code> in center in <code>Div</code> or panel? I have applied following CSS but its does not working:</p>
  
  <pre><code>&lt;asp:Panel ID="pnlGrid" CssClass="panel" runat="server"&gt;
   &lt;div style="text-align:center"&gt;
     &lt;asp:GridView ID="grdReqApproval" runat="server"   AutoGenerateColumns="false"     CssClass="SimpleGrid"&gt;
        &lt;Columns&gt;
    &lt;asp:BoundField DataField="Approved By" HeaderText="Approved By" /&gt;
    &lt;asp:BoundField DataField="User Name" HeaderText="User Name" /&gt;
    &lt;asp:BoundField DataField="Approval Time" HeaderText="Approvel Time" /&gt;
  &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  &lt;/div&gt;
      &lt;/asp:Panel&gt;
  .panel
  {
  width: 330px;
  padding: 10px;
  min-height: 20px;
  border: 1px solid #dcdcdc;
  margin-left:auto;
  margin-right:auto;
  }
  </code></pre>