Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 06-20-2024, 08:12 PM   #1
PilcrowandStanza
Member
PilcrowandStanza began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Dec 2023
Device: none
bad page breaks (CSS keep options?)

Hi all,

I've gotten most of my epub file working, except for pages breaking where I don't want them to:

Any code/tips for:

- keeping headers will following paragraph
- keeping short tables from breaking between pages
- top/bottom of page minimums (2 lines)

This particular file was built from the bottom up with good HTML/CSS coding and converted to epub in Calibre (worked great!).
I just need to know what to change to improve appearance and functionality as an ebook.

Thanks!
PilcrowandStanza is offline   Reply With Quote
Old 06-20-2024, 08:30 PM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,366
Karma: 6794938
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by PilcrowandStanza View Post
- keeping headers will following paragraph
Ensure each chapter is split into its own xhtml file in the epub. That ensures each chapter starts on a fresh page.
Or, you could wrap the header and the first couple of paragraphs in the code mentioned below, but not really the best way.

Quote:
Originally Posted by PilcrowandStanza View Post
- keeping short tables from breaking between pages
You could wrap the table in a div. eg...

Code:
<div class="nopagebreak">
  <table>
    ....
  </table>
</div>
And the css is...
Code:
.nopagebreak {
  break-inside: avoid;
  page-break-inside: avoid;
}
Of course, you most likely will have a large gap on the preceding page as a pagebreak is forced to keep the table together.
Karellen is offline   Reply With Quote
Reply

Tags
coding, css, keep option, page breaks, tables


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Paragraph breaks become page breaks when converting to mobi Allreader Conversion 6 07-19-2021 02:08 AM
Bad Signup Options On Web Sites ebusinesstutor General Discussions 11 01-15-2013 03:18 AM
ADE breaks CSS --> CSS Validation: Parse Error / Value Error dasboeh ePub 4 12-10-2012 04:25 AM
Converting to PDF help? Bad page breaks and no TOC produced. Jokerfwb Conversion 6 07-24-2012 11:36 PM
Adding page breaks in Calibre breaks ePubcheck validation bookraft Conversion 16 03-01-2011 02:23 PM


All times are GMT -4. The time now is 12:17 AM.


MobileRead.com is a privately owned, operated and funded community.