Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 12-18-2022, 05:42 AM   #1
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Struggling with table page breaks

I have on my kobo an ebook with the following table definition:
Code:
table {
  border: none;
  table-layout: auto;
  width: 100%;
  line-height: normal;
}
tr {
  page-break-inside: avoid;
  page-break-after: auto;
}
td {
  padding: 2px;
  border: none;
}
I have the following ebook text entry:

Code:
<body>
  <p>Some text</p>
  /* unwanted page break occurs here */
  <table>
    <tbody>
      <tr>
        <td>column1</td>
        <td>column2</td>
      </tr>
    [...]
      <tr>
        <td>column1</td>
        <td>column2</td>
      </tr>
    <tbody/>
  </table>
</body>
Unfortunately, even when the text paragraph contains little text, and the page has ample space, the table always starts at a new (next) page, even when I add "page-break-before: avoid" in the table definition.
How can I avoid this unwanted page break on a kobo device?
DrChiper is offline   Reply With Quote
Old 12-20-2022, 03:45 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
If you are using KePub, try ePub and if using ePub, try KePub.

Also, if this ePub does not have widows and orphans set to 1 in the body, do so. This is the CSS code I use for body.

Code:
body {
  widows: 1;
  orphans: 1;
  margin-top: 0;
  margin-right: 0;
  margin-bottom: 0;
  margin-left: 0;
  text-align: justify;
}

Last edited by JSWolf; 12-20-2022 at 05:07 PM.
JSWolf is offline   Reply With Quote
Advert
Old 12-22-2022, 09:53 AM   #3
DrChiper
Bookish
DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.DrChiper ought to be getting tired of karma fortunes by now.
 
DrChiper's Avatar
 
Posts: 1,017
Karma: 2003162
Join Date: Jun 2011
Device: PC, t1, t2, t3, Clara BW, Clara HD, Libra 2, Libra Color, Nxtpaper 11
Quote:
Originally Posted by JSWolf View Post
This is the CSS code I use for body.
That is similar to my settings.
Further, the only way for me to get it to work is to avoid inserting any <p>text</p> entry just before the <table> tag to begin the table. Placing <h1></h1> entries before the <table> entry work fine.
It is curious.

Last edited by DrChiper; 12-22-2022 at 09:56 AM.
DrChiper is offline   Reply With Quote
Old 12-23-2022, 03:34 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,756
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DrChiper View Post
That is similar to my settings.
Further, the only way for me to get it to work is to avoid inserting any <p>text</p> entry just before the <table> tag to begin the table. Placing <h1></h1> entries before the <table> entry work fine.
It is curious.
What is the CSS code for <p>?
JSWolf is offline   Reply With Quote
Reply


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
Help with assigning correct page breaks and page numbers to a textbook [converting fr cateroseg Calibre 0 02-14-2018 10:32 PM
iBooks: Avoid page breaks within table rows/cells ckirchho ePub 7 06-12-2012 03:11 PM
epub to mobi h1 page breaks not starting on new page wannabee Conversion 4 08-02-2011 12:46 AM
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 06:30 PM.


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