Just as CSS can be used to change the spacing between letters, it can also be used to change the spacing between words with the word-spacing property.
The form for the word-spacing decalration is:
word-spaing: value
The possible values are normal or length.
length may be expressed in the same units we have used in other lessons, such as px, pt or cm. Percentage (%) is not supported.
Length values may be positive or negative. Positive values move words apart. Negative values move words closer together. Normal is the same as 0 (zero). In other words, the value you use will add to or subtract from the normal distance between words.
Word-spacing can be used in a style statement or as a class.
Sample Stylesheet
/* word-spacing */
.near { word-spacing: -4px; }
.far { word-spacing: 30px; }
.overlap {word-spacing: -1em }
<p class="far">
These words are spread apart.
</p>
<p class="near">
These words are close together.
</p>
<p class="overlap">
These words overlap.
</p>
These words are spread apart.
These words are close together.
These words overlap.
PC Screenshot (white page)
PC Screenshot (black page)
WebTV (MSNTV) does not support word-spacing.
Positive values for word-spacing can simulated:
.<img src="spacer.gif" height="1" width="10" alt="spacer" />
Contemplate the meaning of life.
Happy coding!
Gnubee