letter-spacing (CSS property)
Example
This style rule tightens the letter
spacing in h1 headings by one pixel:
h1 {
letter-spacing: -1px;
}
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
| IE | 5.5 | Full |
|---|---|---|
| 6.0 | Full | |
| 7.0 | Full | |
| Firefox | 1.0 | Full |
| 1.5 | Full | |
| 2.0 | Full | |
| Safari | 1.3 | Full |
| 2.0 | Full | |
| 3.0 | Full | |
| Opera | 9.2 | Full |
| 9.5 | 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
- 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
- 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.

