Thread: hanging indent
View Single Post
Old 11-13-2010, 03:58 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Oldpilot View Post
I reckon I should get rid of margin-left: 22px; but how do I transform the normal indentation to a hanging indent? By changing text-indent: 1.5em to text-indent: -22px; ?
Yes, hanging indent is obtained with:

margin-left: x+y
text-indent: -x

where x is the amount you want it to "hang", and y is the additional left margin you want, if any. In your case x=22px, y=0.

Quote:
While on the subject of CSS, if I want a paragraph to be ragged right, would I change text-align: justify; to text-align: left; ?
Exactly
Jellby is offline   Reply With Quote