View Full Version : Paragraph separation

11-05-2010, 05:51 PM
Hi all,

I got a few books recently, and I realized that the chapters do not have a separation when there is a change of scene. Looking at the Epub source, I see that the source has a <br /> in those places, however the reader (nook) or the desktop reader (Adobe Digital Editions) do not care about that <br />. Sigil, on the other hand, respects it.

This is a sniped of the code in question:

<p class="para1"><span>He nodded. “Why not? We’ve all got to pay the piper sometime, don’t we?” He frowned as the music swelled to even more infuriating levels. “Or in this case, the damned balalaika player.”</span></p><br />

Is there a simple way, via CSS, to force the readers to display a line break at the <br /> ? I know I can go through the text and manually insert a line break, but it would be quicker if I can do so by updating the CSS rules, as I have a few books that show this problem. Thanks in advance!

11-05-2010, 07:32 PM
The <br /> tag is an inline element and cannot be placed outside block elements. Faking it by wrapping everything in a div isn't a solution. The epub is badly coded.

In Sigil, select
<br /> [linebreak] <p class="para1">
press Ctrl-H and put <p class="parabrk"> in the replace box and press replace all. Then add
.parabrk {
margin-top: 1.2em;
margin-bottom: 0;
to the css.

11-05-2010, 08:08 PM
Thanks, I'll try that.