HTML and CSS Reference
In-Depth Information
Initial value:
normal
| Inherited: Yes | Applies to: All Elements | CSS2.1
Browser support: IE 4+, Firefox 1+, Chrome 1+, Opera 3.5+, Safari 1+
The
letter-spacing
property allows you to control the amount of space between each individual character with
the initial value of
normal
being the default amount.
By giving this property a length value, you can increase the space between characters in addition to the default
space.
1.
In styles.css, find the
.showcase .button
rule set and add the following declaration:
letter-spacing: 2px;
2.
Save styles.css.
As you can see in Figure 11-7, when you give the More Information button a
letter-spacing
of
2px
, the space
between characters is slightly increased.
Figure 11-7
The difference between the “More Information” button before and after having its letter-spacing modified.
word-spacing
Initial value:
normal
| Inherited: Yes | Applies to: All Elements | CSS2.1
Browser support: IE 6+, Firefox 1+, Chrome 1+, Opera 3.5+, Safari 1+
Just like
letter-spacing
, the
word-spacing
property enables you to change the spacing between words.
The initial value of
normal
represents the default space between words, and you can specify a length value to ad-
just this space as you see fit.
direction
Initial value:
ltr
| Inherited: Yes | Applies to: All Elements | CSS2.1
Browser support: IE 5.5+, Firefox 1+, Chrome 2+, Opera 9.2+, Safari 1.3+
The
direction
property determines the direction of text. The initial value
ltr
means left to right. The value
rtl
(right to left) can be used for Hebrew and Arabic text. Note however, that specifying the direction of text is normally
done in the HTML using the
dir
attribute.