<html>
<head>
<title>Abakada CSS Demo: letter-spacing Attribute</title>
<link rel="stylesheet" href="/shared/netdemos.css">
<style type="text/css">
<!--
button { background: #345; color: ddf; font: bold }
-->
</style>
</head>
<body>
<!-- #include virtual="~/shared/top.inc" -->
<div class="header"><h2>Abakada CSS Demo: letter-spacing Attribute</h2></div>
<hr size=1 width=92%>
<center>
<h5>This example shows the effects of applying the different values possible for the CSS <b>letter-spacing</b> style attribute.</h5>
<p id="msg">Enter a letter-spacing value, and select a unit value from the options below to see how the style is applied. Note the resulting CSS syntax for the style declaration. </p>
<h5 id="theSyntax">Syntax { letter-spacing: normal }</h5>
<table cellpadding=5>
<tr>
<td>Enter value</td>
<td><input type="text" name="space" size=3 maxlength=3 tabindex=1 onchange="chgProp ( this.value+units.value )"></td>
<td>Unit</td>
<td><select name="units" tabindex=2 onchange="chgProp ( space.value + this.value )">
<option value="">
<option value="px">px
<option value="pt">pt
<option value="mm">mm
<option value="cm">cm
<option value="in">in
<option value="em">em
<option value="ex">ex
</select></td>
<td><button onclick="reset ( )">Reset</button></td>
</tr>
</table>
<p class="small"><b>Click or TAB to cycle thru the fields</b>. </p>
<p class="note">NOTE: <b>letter-spacing</b> defaults to pixel ( <b>px</b> ) values if no length unit is specified. </p>
</center>
<script language="JavaScript">
<!--
function chgProp ( ls ) {
if ( space.value == 0 ) {
alert ( "Letter spacing value can not be blank or zero!" );
reset ( );
return;
}
else msg.style.letterSpacing = ls;
txt = "Syntax { letter-spacing: " + ls + " }"
theSyntax.innerText = txt;
}
function reset ( ) {
space.value = "";
units.value = "";
msg.style.letterSpacing = "normal";
theSyntax.innerText = "Syntax { letter-spacing: normal }";
}
//-->
</script>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>