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; 
}

  

 

 

 

back to top