Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-12-2010, 04:06 PM   #1
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
hanging indent

I have a bibliography in my most recent project, and I called for a hanging indent in the html. It looks just fine on the Kindle, but when I converted the mobi file to an epub on Calibre, then opened it in Sigil for tweaking, the hanging indent turned out to be normal paragraphing set in from the left margin. Here's the relevant code from the stylesheet:

.calibre18 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0;
margin-left: 22px;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-align: justify;
text-indent: 1.5em
}


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; ?

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; ?

Thanks!
Oldpilot is offline   Reply With Quote
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
Advert
Old 11-13-2010, 06:20 AM   #3
Oldpilot
Groupie
Oldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with othersOldpilot plays well with others
 
Posts: 184
Karma: 2572
Join Date: Aug 2010
Device: Kindle
That works!
Oldpilot is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Books you're hanging out for. mukoan Reading Recommendations 20 07-31-2010 06:06 PM
iriver hanging, Im helpless.... Hendrix iRiver Story 4 04-30-2010 01:56 AM
Can't have hanging indent in Mobi Yo_E_C Introduce Yourself 2 08-21-2009 08:51 PM
Hanging indents? llasram Kindle Formats 11 01-05-2009 10:59 AM
hanging on pdf's deadite66 iRex 1 08-07-2007 08:21 AM


All times are GMT -4. The time now is 02:54 AM.


MobileRead.com is a privately owned, operated and funded community.