B.56. letter-spacing

This property lets you either increase or decrease the amount of spacing between characters in an element.

Inherited: Yes

See also: Section B.128word-spacing

B.56.1. Value

Any CSS length or normal. Percentages are not allowed.

Positive lengths increase letter spacing by the specified amount, while negative lengths decrease it. In most cases, it is preferable to specify the spacing in ems (e.g. 0.5em), as this will preserve the relative spacing of letters, even if you change the font size (one em is equal to the height of the current font).

Initial value: normal

B.56.2. Compatibility

CSS Version: 1

Supported by all CSS-compatible browsers, with the notable exception of Netscape 4.

B.56.3. Examples

This style rule sets all elements of class spacy to have extra spacing one half the height of the font between each character:

.spacy {
  letter-spacing: 0.5em;
}

This style rule sets all elements of class crowded to display characters one half the font size closer together than usual:

.crowded {
  letter-spacing: -0.5em;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset