<html>
<head>
<title>Abakada CSS Demo: vertical-align Attribute</title>
<link rel="stylesheet" href="/shared/netdemos.css">
<style type="text/css">
<!--
td { background-color: whitesmoke }
button { background: #345; color: ddf; font: bold }
-->
</style>
</head>
<body>
<!-- #include virtual="~/shared/top.inc" -->
<div class="header"><h2>Abakada CSS Demo: vertical-align Attribute</h2></div>
<hr size=1 width=92%>
<table align="center" width="98%" cellspacing=1 cellpadding=10>
<tr>
<td id="msg" width="50%">The <b>vertical-align</b> attribute is used to get or set the vertical positioning of an object.</td>
<td width="50%">This example shows the effects of applying the different values possible for the CSS <b>vertical-align</b> style attribute to align text within a table cell. Select from the vertical-align options below to see how the style is applied, and note the resulting CSS syntax for the style declaration.</td></tr>
</table>
<center>
<h5 id="theSyntax">td { vertical-align: }</h5>
<table cellpadding=5>
<tr>
<td align="right">Options</td>
<td><select name="units" tabindex=1 onchange="chgProp ( this.value )">
<option value="">
<option value="middle">middle
<option value="top">top
<option value="bottom">bottom
<option value="baseline">baseline
<option value="text-top">text-top
<option value="text-bottom">text-bottom
<option value="sub">sub
<option value="super">super
</select></td>
<td><button onclick="reset ( )">Reset</button></td>
</tr>
</table>
<p class="note">NOTE: The values <b>sub</b> and <b>super</b> apply only to inline text. The other values apply to block elements that support the <b>VALIGN</b> style attribute. </p>
</center>
<script language="JavaScript">
<!--
function chgProp ( va ) {
msg.style.verticalAlign = va;
txt = "td { vertical-align: " + va + " }";
theSyntax.innerText = txt;
}
function reset ( ) {
units.value = ""
msg.style.verticalAlign = "";
theSyntax.innerText = "td { vertical-align: }";
}
//-->
</script>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>