Skip to: content, navigation

by Tommy Olsson and Paul O’Brien

letter-spacing (CSS property)

Browser support full matrix
IE5.5+ FF1+ Saf1.3+ Op9.2+
Full Full Full Full
Spec
Inherited Initial Version
Yes normal CSS1, 2

Example

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

h1 {
  letter-spacing: -1px;
}

Try it yourself!View all demos

Description

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

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

IE5.5Full
6.0Full
7.0Full
Firefox1.0Full
1.5Full
2.0Full
Safari1.3Full
2.0Full
3.0Full
Opera9.2Full
9.5Full

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
Date:
Thu, 06 Mar 2008 14:41:04 GMT
Contributed by:
tim.cutting

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
Date:
Thu, 07 Feb 2008 01:17:41 GMT
Contributed by:
AlexW

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

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters