Set letter spacing in Javascript
Description
The following code shows how to set letter spacing in Javascript.
Example
<html>
<head>
<script type="text/javascript">
function bigger() {<!--from w ww . j av a2 s . c o m-->
var div = document.getElementById("div1");
div.style.letterSpacing = "10px";
}
function smaller() {
var div = document.getElementById("div1");
div.style.letterSpacing = "normal";
}
</script>
</head>
<body>
<a href="javascript:bigger();">bigger</a>
<a href="javascript:smaller();">smaller</a>
<div id="div1">
<p>p1</p>
<p>p2</p>
</div>
</body>
</html>