View Full Version : How do I indent each line of my fixed-layout epub?


krausj
06-07-2013, 09:11 AM
This is how the text is set up in xhtml documents:

[Image exceeds guidelines for image - MODERATOR]

mrmikel
06-07-2013, 09:42 AM
If you want the whole paragraph indented like in a quote, create a new class with a left margin of whatever you want...10px maybe.

This is what I use for quotes:

.quote {margin-left:7%; margin-right:7%;text-indent:0px; text-align:justify;}

exaltedwombat
06-08-2013, 02:02 PM
Forget about using <br/>. You need to define some classes in your stylesheet, with suitable values for text-indent and margin-top. This should do. Use <p class="p1"> for the first paragraph of a block, just <p> for subsequent paragraphs.

p {margin:0; text-indent:1.3em;}

.p1 {margin-top:1em;text-indent:0;}



<body>
<h1>Title</h1>
<p class="p1">First paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent</p>

<p>Subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above.</p>

<p>Short paragraph with same settings.</p>

<p>Another short paragraph with same settings.</p>

<p>Subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above subsequent paragraph with no indent or space above.</p>

<p class="p1">First paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent first paragraph with space above and indent.</p>
</body>

JSWolf
06-08-2013, 05:43 PM
If you want the whole paragraph indented like in a quote, create a new class with a left margin of whatever you want...10px maybe.

This is what I use for quotes:

.quote {margin-left:7%; margin-right:7%;text-indent:0px; text-align:justify;}

Would be better off with a blockquote. The default values for a block quote are margin-top: 1.2em; margin-bottom: 1.2em; margin-left: 42px; margin-right 42px. You can change this in CSS if you want.

JSWolf
06-08-2013, 05:44 PM
Forget about using <br/>. You need to define some classes in your stylesheet, with suitable values for text-indent and margin-top. This should do. Use <p class="p1"> for the first paragraph of a block, just <p> for subsequent paragraphs.

p {margin:0; text-indent:1.3em;}

.p1 {margin-top:1em;text-indent:0;}

I would do .p1 differently. I would have the header style put in the bottom margin and have .p1 have no top margin. No need for it.

exaltedwombat
06-08-2013, 06:47 PM
I would do .p1 differently. I would have the header style put in the bottom margin and have .p1 have no top margin. No need for it.

It looked as if not all blocks of text had a heading? And I'm not at all sure whether he wants white space between sections, or a block indent.

JSWolf
06-08-2013, 06:51 PM
Did it get mentioned that unless this is ePub 3 code, it's not actually ePub as there is no fixed-layout standard except ePub 3?

iBooks, nook, Kobo, etc all use something different.

krausj
06-12-2013, 11:17 AM
awesome! Thanks so much for the detailed responses. So far so good