<html>
<head>
<title>Abakada CSS Demo: text-indent Attribute</title>
<link rel="stylesheet" href="/shared/netdemos.css">
<style type="text/css">
<!--
#msg {
text-align: justify }
button {
background: #345; color: ddf; font: bold }
-->
</style>
</head>
<body>
<!-- #include virtual="~/shared/top.inc" -->
<div class="header"><h2>Abakada CSS Demo: text-indent Attribute</h2></div>
<hr size=1 width=92%>
<center>
<h5>This example shows the effects of applying different values and length units possible for the CSS <b>text-indent</b> style attribute.</h5>
<p id="msg">Enter a text-indent 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 { text-indent: }</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="%">%
</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>TEXT-INDENT</b> defaults to pixel ( <b>px</b> ) values if no length unit is specified. </p>
</center>
<script language="JavaScript">
<!--
function chgProp ( ti ) {
if ( space.value == 0 ) {
alert ( "Text indent value can not be blank or zero" );
reset ( );
return;
}
else msg.style.textIndent = ti;
txt = "Syntax { text-indent: " + ti + " }";
theSyntax.innerText = txt;
}
function reset ( ) {
space.value = "";
units.value = ""
msg.style.textIndent = "";
theSyntax.innerText = "Syntax { text-indent: }";
}
//-->
</script>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>