HBCMS更多的中文手册参考:

vertical-align Attribute | verticalAlign参数属性

DHTML文档教程

Sets or retrieves the vertical alignment of the object.

dhtml语法

HTML { vertical-align : sAlign }
Scriptingobject.style.verticalAlign [ = sAlign ]

DHTML可能的值

sAlignVariant that specifies or receives one of the following values.
autoAligns the contents of an object according to the value of the layout-flow attribute.
baselinedefault. aligns the contents of an object supporting valign to the base line.
subvertically aligns the text to subscript.
supervertically aligns the text to superscript.
topvertically aligns the contents of an object supporting valign to the top of the object.
middlevertically aligns the contents of an object supporting valign to the middle of the object.
bottomvertically aligns the contents of an object supporting valign to the bottom of the object.
text-topvertically aligns the text of an object supporting valign to the top of the object.
text-bottomVertically aligns the text of an object supporting VALIGN to the bottom of the object.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has a default value of baseline for all objects with the exception of currentstyle which has a default value of auto. The Cascading Style Sheets (CSS) attribute is not inherited.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.

remarks

the sub and super values are supported on text. the auto value is supported on the currentstyle object. the other values are supported on objects that support valign.

the auto value is identical to the baseline value when the layout-flow is horizontal. when the layout-flow is vertical-ideographic, the auto value is identical to the middle value.

DHTML代码范例

This example uses the verticalAlign property to align text within a table cell.

 <TABLE BORDER width=100>
<TR>
<TD onmouseover="this.style.verticalAlign='bottom'"
onmouseout="this.style.verticalAlign=''">
text to align</TD>
</TR>
</TABLE>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

是否符合公共标准

This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Non-Microsoft link.

Applies To

COL, currentStyle, CUSTOM, defaults, IMG, runtimeStyle, SPAN, style, TBODY, TD, TFOOT, TH, THEAD, TR

更多语法参考

vAlign