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, 07:12 PM   #1
PilcrowandStanza
Junior Member
PilcrowandStanza began at the beginning.
 
Posts: 8
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, 07: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,186
Karma: 4949904
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 online now   Reply With Quote
Advert
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 01:08 AM
Bad Signup Options On Web Sites ebusinesstutor General Discussions 11 01-15-2013 02:18 AM
ADE breaks CSS --> CSS Validation: Parse Error / Value Error dasboeh ePub 4 12-10-2012 03:25 AM
Converting to PDF help? Bad page breaks and no TOC produced. Jokerfwb Conversion 6 07-24-2012 10:36 PM
Adding page breaks in Calibre breaks ePubcheck validation bookraft Conversion 16 03-01-2011 01:23 PM


All times are GMT -4. The time now is 02:56 PM.


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