title: To Align The Title of a Gridview Column to center
body: <p>I have a <code>GridView</code> .
  I am trying to bring the headers to center nothing works </p>
  
  <pre><code> &lt;asp:GridView ID="GridviewDataCoupon" runat="server" Style="text-align: center" Visible="false" ShowFooter="true" Width="99%"
                                  AutoGenerateColumns="false"&gt;
                                  &lt;Columns&gt;
  
                                  &lt;asp:TemplateField HeaderText="End Date" HeaderStyle-BackColor="#99CCCC"&gt;
                                          &lt;ItemTemplate&gt;
                                              &lt;asp:Label ID="lbl4" runat="server" Text='&lt;%# Eval("end_date") %&gt;'&gt;
                                              &lt;/asp:Label&gt;
                                          &lt;/ItemTemplate&gt;
                                      &lt;/asp:TemplateField&gt;
                                  &lt;/Columns&gt;
  
                                  &lt;FooterStyle BackColor="#99CCCC" ForeColor="#003399" /&gt;
                                  &lt;PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" /&gt;
                                  &lt;AlternatingRowStyle BackColor="WhiteSmoke" ForeColor="Black" /&gt;
                                  &lt;RowStyle BackColor="White" ForeColor="Black" /&gt;
                                  &lt;SelectedRowStyle BackColor="#009999" Font-Bold="True" ForeColor="#CCFF99" /&gt;
                                  &lt;SortedAscendingCellStyle BackColor="#EDF6F6" /&gt;
                                  &lt;SortedAscendingHeaderStyle BackColor="#0D4AC4" /&gt;
                                  &lt;SortedDescendingCellStyle BackColor="#D6DFDF" /&gt;
                                  &lt;SortedDescendingHeaderStyle BackColor="#002876" /&gt;
                              &lt;/asp:GridView&gt;
  </code></pre>