CSS: text justify and letter-spacing

letter-spacing is a useful CSS property that controls the spacing between letters. Generally speaking, this property is used very seldom and only to achieve certain effects on small portions of text (such as headings). However, as Mark Schenk did demonstrate, this property can also be used to control the justification of larger sections of text, such as paragraphs. Combined with the text-align property, we can actually achieve good results, as shown in the following example:

h2 {
 
 font: normal 3em Georgia, serif;
 color: #d40;
 letter-spacing: 0.1em;
 text-transform: uppercase;
 text-align: center;
 margin: 0;
 
}

p {
 
 line-height: 1.4;
 letter-spacing: 0.1em;
 text-align: justify;
} 

And this is the result:

As you can see, the results achieved are good and this proves the benefits of Mark Schenk's intuition.

This entry was posted in by Gabriele Romanato. Bookmark the permalink.

Leave a Reply

Note: Only a member of this blog may post a comment.