View Full Version : Problem with blank pages between chapters


AlexBell
07-22-2010, 08:09 AM
I've just uploaded Lorna Doone, by R.D. Blackmore despite it having a problem in that it shows unnecessary and unwanted blank pages between chapters 37 and 38, and between chapters 74 and 75. I have no idea why it is doing this, and would be most grateful to anyone who can point out things that I can check to find out what is going on.

Because the book has 75 chapters I have grouped them in blocks of 10 chapters. Each chapter is formed on this template:

<div class="section" id="idno">

<h2>Section or chapter heading</h2><hr />

<p>Chapter material goes here</p>

<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam bibendum tempor nulla. Sed commodo. Aliquam feugiat lorem nec sem. Nullam consequat tristique libero. Suspendisse id erat. Duis ante sem, laoreet nec, nonummy non, posuere at, sapien. Nam porta. Cras sapien tortor, vehicula at, scelerisque quis, consequat at, enim. Fusce quis tortor. Quisque magna. Proin nunc. Phasellus purus metus, tempus a, lobortis in, mollis sed, erat. Nulla facilisi. Curabitur wisi.</p>

</div> <!-- End of chapter div; page break is in the CSS -->

and the CSS for section and page break is:

div.section {
margin: 0;
padding: 2em 0 0 0;
page-break-after: always;
} /* Sets top margin and page break for preface and chapters. */
div.section h2 { line-height: 110%; }

I can't see any way an extra page break from the CSS should occur where it does.

Can anyone help? It's probably staring me in the face but I can't see it and it's very frustrating.

Regards, Alex

charleski
07-22-2010, 10:07 AM
Hmm, just took a look at it in Desktop ADE and I can't see the problem you describe, the page breaks seem just fine.

BTW, if you want footnotes to display without disrupting the line height in ADE, the right vertical-align (http://www.mobileread.com/forums/showpost.php?p=814110&postcount=70) to use is 'top', as 'text-top' will usually cause a gap:

.fn { font-size: 67%; vertical-align: text-top; }
http://www.mobileread.com/forums/attachment.php?attachmentid=55595&stc=1&d=1279879040

.fn { font-size: 67%; vertical-align: top; line-height: 0.8}
http://www.mobileread.com/forums/attachment.php?attachmentid=55596&stc=1&d=1279879040

AlexBell
07-23-2010, 06:41 AM
Hmm, just took a look at it in Desktop ADE and I can't see the problem you describe, the page breaks seem just fine.

BTW, if you want footnotes to display without disrupting the line height in ADE, the right vertical-align (http://www.mobileread.com/forums/showpost.php?p=814110&postcount=70) to use is 'top', as 'text-top' will usually cause a gap:

.fn { font-size: 67%; vertical-align: text-top; }
http://www.mobileread.com/forums/attachment.php?attachmentid=55561&stc=1&d=1279803749

.fn { font-size: 67%; vertical-align: top; line-height: 0.8}
http://www.mobileread.com/forums/attachment.php?attachmentid=55562&stc=1&d=1279803749

Thanks, Charleski, that's most helpful. I hadn't looked at the problem with ADE, only on my Cybook Gen3. I'll read the book with ADE and see how it looks. Of course I still don't know why I'm seeing the extra blank pages on my Cybook.

And thanks for the hint about top rather text-top. Why did you suggest line-height: 0.8?

Regards, Alex

charleski
07-23-2010, 07:25 AM
In practice, the line-height value adjusts the vertical position of the superscript. Smaller values raise it higher, larger push it lower. Without this attribute it sits at the baseline.

'Text-top' should work without disrupting the line-height, and frankly so should 'super', but CSS is biased towards making sure text doesn't collide rather than maintaining a regular line-height, and this is the only value I found that will override that annoying behaviour.

Jellby
07-23-2010, 08:01 AM
I think I've used "font-size: 60%; vertical-align: super; line-height: 0;" sucessfully to get a correct superscript alignment and no effect on the inter-line separation (but with collisions sometimes, depending on the font).