HTML CSS Reference/CSS Attributes and Javascript Style Properties/vertical align
Содержание
"vertical-align" Example
<source lang="html4strict">
<html> <body>
Cell 1 content | Cell 2 content |
<img src="http://www.wbex.ru/style/logo.png">Cell 3 text content | Cell 4 text content |
<input type="button"
onclick="myT.style.verticalAlign="text-top"" value="Set verticalAlign to text-top">
<input type="button"
onclick="myT.style.verticalAlign="text-bottom"" value="Set verticalAlign to text-bottom">
<input type="button"
onclick="myT.style.verticalAlign="top"" value="Set verticalAlign to top">
<input type="button"
onclick="myT.style.verticalAlign="bottom"" value="Set verticalAlign to bottom">
<input type="button"
onclick="myT.style.verticalAlign="auto"" value="Restore position">
</body> </html>
</source>
"vertical-align" is applied to
<source lang="html4strict">
+----------------+--------------------------------------------------------------+ | Applied_To |<col> currentStyle | | |<custom> defaults | | |<img> runtimeStyle | | | style | | |<tbody> <td> | | |<tfoot> <th> | | |<thead> <tr> | +----------------+--------------------------------------------------------------+
</source>
"vertical-align" Possible Values
<source lang="html4strict">
Possible Values auto, baseline (the default), sub (aligns to subscript), sup (aligns to superscript), top, middle, bottom, text-top, text-bottom.
</source>
"vertical-align" Syntax and Note
<source lang="html4strict">
Note: Controls the vertical alignment. Syntax:
element { vertical-align: value } elementID.style.verticalAlign = "value" document.all.elementID.style.verticalAlign = "value" // IE only
</source>