HorizontalAlign Enumeration
Collapse the table of content
Expand the table of content

HorizontalAlign Enumeration


Specifies the horizontal alignment of items within a container.

Namespace:   System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public enum HorizontalAlign

Member nameDescription

The contents of a container are centered.


The contents of a container are uniformly spread out and aligned with both the left and right margins.


The contents of a container are left justified.


The horizontal alignment is not set.


The contents of a container are right justified.

The HorizontalAlign enumeration represents the horizontal alignment options for items within a container, such as a TableCell.

The following example shows how setting the HorizontalAlign property of a Panel control changes the horizontal alignment for the text of a Label control that is contained by the Panel control.

.NET Framework
Available since 1.1
Return to top
© 2015 Microsoft