This documentation is archived and is not being maintained.

HtmlTable::Align Property

Gets or sets the alignment of the HtmlTable control in relation to other elements on the Web page.

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

public:
property String^ Align {
	String^ get ();
	void set (String^ value);
}
<asp:HtmlTable Align="String" />

Property Value

Type: System::String
The alignment of the HtmlTable control in relation to other elements on the Web page. The default value is String::Empty, which indicates that this property is not set.

Use the Align property to specify the alignment of the HtmlTable control in relation to other elements on the Web page.

NoteNote

This property does not control the alignment of the contents in the cells of the HtmlTable control. To control the alignment of contents of an individual cell, use the Align and VAlign properties of the HtmlTableCell class. You can also control the alignment of contents of the cells in an entire row by using the Align and VAlign properties of the HtmlTableRow class.

The following table lists the values that can be used for this property.

Value

Description

Left

Aligns the HtmlTable control on the left edge of the Web page.

Center

Aligns the HtmlTable control in the middle of the Web page.

Right

Aligns the HtmlTable control on the right edge of the Web page.

NoteNote

If you specify Left or Right alignment, other elements on the Web page will wrap to the right or left of the HtmlTable control, respectively. If you specify Center alignment, no wrapping occurs and other elements appear below the control.

The following code example demonstrates how to use the Align property to specify the alignment of the HtmlTable control in relation to other elements on the Web page.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: