3 out of 8 rated this helpful - Rate this topic

letter-spacing property

Sets or retrieves the amount of additional space between letters in the object.

CSS 2.1, Section 5.4.2

Syntax

letter-spacing: normal | <length> | inherit

Property values

normal

Default. Default spacing.

length

Floating-point number, followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px). For more information about the supported length units, see CSS Values and Units Reference.

inherit

CSS information

Applies ToAll elements
Mediavisual
Inherited1
Initial Value

Standards information

Remarks

When specified as a positive length value, the letter-spacing attribute adds the specified value to the default spacing between characters within an element. A negative length value decreases the space between characters. Letter spacing can be influenced by justification.

Examples

The following examples use the letter-spacing attribute and the letter-spacing property to change the space between letters.

This example uses blockquote as a selector to change the spacing to -0.2 millimeters for all blockquote objects on the page.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/letter-spacing.htm


<STYLE>
    BLOCKQUOTE { letter-spacing:-0.2mm }
</STYLE>

This example uses inline scripting to set the spacing to 1 millimeter when an onmouseover event occurs.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/letterSpacing.htm


<DIV STYLE="font-size:14" onmouseover="this.style.letterSpacing='1mm'">
:
</DIV>

See also

CSSStyleDeclaration
currentStyle
defaults
runtimeStyle
style

 

 

Send comments about this topic to Microsoft

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.