XML technologies / CSS / Advanced websites with CSS / CSS property reference / letter-spacing
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The property letter-spacing describes the spacing between characters in an element (also called kerning ).
Inherited: Yes
See also: word-spacing
Values
A CSS measurement or normal. Percentages are not allowed.
Positive values increase letter spacing; negative values reduce it. In most cases, values in em (em height) are recommended. This preserves the typeface’s relative character spacing even when the font size changes. (A typeface’s height is also calculated using the em height.)
Default value: normal
Compatibility
CSS version: 1
Works in all CSS-capable browsers except Netscape 4.
Example
The following rule increases character spacing by half the font size for all elements of the class luftig:
.luftig{
letter-spacing: 0.5em;
}The following rule decreases character spacing by half the font size for all elements of the class gedraengt:
.gedraengt{
letter-spacing: -0.5em;
}
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg