How to prevent page breaks?
I'm converting a trilogy of books to EPUB format. I did the first book with relatively little trouble, because it's mostly text with some minor formatting (some italics and boldface, a couple of chunks in boxes). By some good luck, all the boxes land in the middle of a page, so there's no problem with page breaks.
But the second book has much more boxed text. Some of it is just in boxes to represent it appearing on a monitor, and some is tabular material with boxes around and between the cells. When I look at the HTML with a browser, it looks fine. But when I convert it to EPUB and look at it in an EPUB viewer, some of those boxes end up crossing a page boundary, so that the top part of the box is at the bottom of a page and the bottom part is at the top of the next page.
This isn't what I want, at all. I have tried adding page-break-within:avoid, but that doesn't seem to affect things at all. My boxed tables still end up split between pages.
So I guess my first question is: who/what makes the decision over where to split pages? Is it the program that converts from HTML to EPUB? Or is it the EPUB viewer.
If the viewer, is there any way to convince the viewer that it should not put a page break in the middle of a (particular) paragraph and/or table? If so, how?
If the conversion, is there a better way to convince the conversion program (I'm using Calibre) to not put a page break in a table. Or if not, is there some other conversion program that _will_ follow my directions in this regard?
|