HtmlTableCell.VAlign Property

Gets or sets the vertical alignment for the content of a cell represented by an instance of the HtmlTableCell class.

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

public:
property String^ VAlign {
	String^ get ();
	void set (String^ value);
}
/** @property */
public String get_VAlign ()

/** @property */
public void set_VAlign (String value)

public function get VAlign () : String

public function set VAlign (value : String)

Not applicable.

Property Value

The vertical alignment for the content of a cell represented by an instance of HtmlTableCell. The default value is String.Empty, which indicates that this property is not set.

Use the VAlign property to specify the vertical alignment of the content in a cell represented by an instance of the HtmlTableCell class.

NoteNote:

Setting this property affects only the cell represented by an instance of the HtmlTableCell class. To apply the same vertical alignment to the cells of an entire row in the table, set the VAlign property of the row represented by an instance of the HtmlTableRow class.

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

Value

Description

Top

Aligns the contents of a cell with the upper edge of the cell.

Middle

Aligns the contents of a cell in the center of the cell.

Bottom

Aligns the contents of a cell with the lower edge of the cell.

NoteNote:

You can also use BaseLine as a value for this property. However, not all browsers support this feature.

The following code example demonstrates how to use the VAlign property to programmatically control the vertical alignment of the contents of the cells in an HtmlTable control.

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

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show: