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);
}

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.

System_CAPS_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.

System_CAPS_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
Available since 1.1
Return to top
Show: