Skip to: content, navigation

letter-spacing (CSS property)

Spec
Inherited Initial Version
Yes normal CSS1, 2
Browser support (more…)
IE5.5+ FF1+ SA1.3+ OP9.2+
Full Full Full Full

Syntax

letter-spacing: { length | normal | inherit } ;

Description

This property sets the extra spacing between characters in the text content of an element.

Example

This style rule tightens the letter spacing in h1 headings by one pixel:

h1 {
  letter-spacing: -1px;
}

Value

A length value specifies extra space to be inserted between characters in addition to the default inter-character space. This space may not be adjusted by the user agent in order to justify text.

Negative length values are legal.

normal means there will be no extra space between characters. The space may be adjusted by the user agent in order to justify text.

Note that normal and 0 are not fully equivalent. If the value is normal, the user agent is allowed to adjust the letter spacing for justified text; if the value is 0, it cannot.

Compatibility

Internet Explorer Firefox Safari Opera
5.5 6.0 7.0 1.0 1.5 2.0 1.3 2.0 3.0 9.2 9.5
Full Full Full Full Full Full Full Full Full Full Full

Internet Explorer for Windows versions up to and including 7 exhibit an exotic bug whereby every other br element within an element whose letter-spacing is a length value will be ignored.

Internet Explorer for Windows versions up to and including 7 don’t support the value inherit.

User-contributed notes

ID:
#2
Contributed:
by tim.cutting
Date:
Thu, 06 Mar 2008 14:41:04 GMT

A quick heads up - seems 'letter-spacing' in Internet Explorer 8 is buggy at the moment. Still working on the exact causes but elements styled off the ID of a parent seem to cause the problem.

IE8 is still in beta, obviously, so not exactly the end of the world.

ID:
#1
Contributed:
by AlexW
Date:
Thu, 07 Feb 2008 01:17:41 GMT

AFAIK Percentage values seem to have no effect when used in letter-spacing.

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

Search