View Full Version : Problem with non-indented paragraph


Soxendom
05-15-2011, 02:47 PM
I am attempting to alter an epub generated with Writer2epub - just the bits that it doesn't cater for.
My problem is this:
In the book, in the middle of some ordinary paragraphs there are a couple of verses of a song. The verses come out fine (Thanks Jelleby - I used some code that you'd shown - I hope you don't mind), but the paragraphs afterwards are non-indented as though they were a new chapter - which they aren't.
I put in <p> </p> in between the verse and the paragraph but that didn't seem to work either. How do I get it so that the next paragraph is indented.
The coding for the paragraphs are:
p
{
margin:0pt;
text-indent:0em;
text-align: justify;
font-size: 1.00em;
}
p+p
{
text-indent:1.5em;
text-align: justify;
font-size: 1.00em;
}

Jellby
05-16-2011, 04:29 AM
You are telling that "normal" paragraphs are not indented, and only paragraphs that come after a paragraph have a 1.5em indent. You can either:

1. Add a rule to indent paragraphs that come after a poetry fragment too:

div.poetry + p {
text-indent: 1.5em;
}

2. Reverse the rules, to have normal paragraphs indented, and only those that come after a heading indented:

p {
margin: 0;
text-indent: 1.5em;
text-align: justify;
font-size: 1.00em;
}
h1 + p, h2 + p, h3 + p { /* and more, if needed */
text-indent: 0em;
}

3. Or add a specific class for non-indented paragraphs:

p.noindent {
text-indent: 0;
}

Soxendom
05-16-2011, 06:30 AM
Thank You