tags:

views:

54

answers:

2

Hello,

Is it possible with CSS to adjust kerning in CSS? I'd like to be able to kern a block of text such that it will actually look like a block of text (both left and right edges are aligned).

Thanks!

A: 

Typographic alignment both left and right is called justification. Kerning is more about the adjustment of spaces between letters, and doesn't have much to do with alignment (because justifying text is more adjustment of spaces between words than characters). Anyway, you want to set the text-align property to justify:

<p style="text-align:justify">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse vestibulum tincidunt ante mollis ornare. Nulla id
nulla justo. Mauris quis sapien ac orci consequat accumsan. Quisque iaculis ipsum ac nulla venenatis sagittis. Aliquam
hendrerit mi a turpis malesuada nec dictum est vehicula. Curabitur quis dolor eu metus malesuada dictum adipiscing et
risus. Aliquam erat volutpat. Aenean pharetra aliquam magna, fringilla tempus erat iaculis eu. Suspendisse potenti.
Sed fringilla lobortis viverra.
</p>
Typeoneerror
+1  A: 

Some control on kerning can be achieved in CSS using the letter-spacing attribute.

However, if all you need is to get "both left and right edges aligned", you might want to try using text-align: justify.

Frédéric Hamidi