MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Formatting in Sigil (https://www.mobileread.com/forums/showthread.php?t=168837)

Rizphil 02-12-2012 05:18 PM

Formatting in Sigil
 
Greetings all.
I'm trying my hand at writing my own ebook using Sigil, however I'm having trouble formatting it the way I'd like. Specifically, I do not want any spacing between paragraphs, and after the first paragraph, I would like an indent just like you see in a paperback book. Every time I begin an new paragraph, Sigil creates a blank line and the new paragraph is once again left aligned.
I've opened other Sigil ebooks which are formatted the way I want mine to look, and cut and pasted some of the code in the code view to my book, but still no luck.

Any suggestions?


Thanks

DiapDealer 02-12-2012 05:25 PM

Brush up on CSS. You're seeing the default style for paragraphs.

mmat1 02-13-2012 02:34 PM

Quote:

Originally Posted by Rizphil (Post 1963193)
Specifically, I do not want any spacing between paragraphs, and after the first paragraph, I would like an indent just like you see in a paperback book. Thanks

Put the following code in the <head> section of you html-file:

<style type="text/css">
/*<![CDATA[*/
p { margin: 0 0; text-indent: 1em; text-align: justify; }
/*]]>*/
</style>

Every paragraph (including the first one) will use this. It will have a small indent and there will be no space between paragraphs.

Did this get you a bit closer to the formatting you want ?

Keroberos 02-13-2012 05:31 PM

A good place to check out for learning CSS is the w3school site.

Toxaris 02-14-2012 03:39 AM

Quote:

Originally Posted by mmat1 (Post 1964222)
Put the following code in the <head> section of you html-file:

<style type="text/css">
/*<![CDATA[*/
p { margin: 0 0; text-indent: 1em; text-align: justify; }
/*]]>*/
</style>

Every paragraph (including the first one) will use this. It will have a small indent and there will be no space between paragraphs.

Did this get you a bit closer to the formatting you want ?

Although fine in general, I would really recommend not doing this in an internal stylesheet, but rather a external. It makes formatting a lot more predictable and repeatable. It also saves size and makes it easier maintainable.


All times are GMT -4. The time now is 10:09 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.