N
Nathan Sokalski
As most of us probably know, the <center> tag is deprecated. Because many
elements and controls have an align attribute, centering them is easy
enough. However, certain elements/controls do not (such as the ASP.NET
Button and Label controls). For the ASP.NET label control I usually just add
the following attributes:
Width="100%" style="text-align:center;"
However, this does not work for controls such as the ASP.NET Button control.
The only solution I can think of is to nest it inside of <div
align="center"></div> tags. However, this could add a lot of extra tags. Any
suggestions? Thanks.
elements and controls have an align attribute, centering them is easy
enough. However, certain elements/controls do not (such as the ASP.NET
Button and Label controls). For the ASP.NET label control I usually just add
the following attributes:
Width="100%" style="text-align:center;"
However, this does not work for controls such as the ASP.NET Button control.
The only solution I can think of is to nest it inside of <div
align="center"></div> tags. However, this could add a lot of extra tags. Any
suggestions? Thanks.