epub.js
epub.js copied to clipboard
page-break-after: always not honored
I have an epub that has each chapter wrapped in a section with the property page-break-after: always, but several of the chapters are getting rendered starting in the middle of the page.
Chapter V is the first chapter that is getting rendered mid page for me.
epub file: https://epubs.bookroo.com/happy-jack.epub
See #261. page-break-after: always
only works in paged media. In multicolumn layout, which Epub.js uses, the only way to force column breaks is replacing page-break-after: always
with break-after: column
(or -webkit-column-break-after: always
). (But then you would no longer get page breaks when printing. AFAIKT, browsers don't support break-after: always
or all
, which is unfortunate.)
Great, thanks for the explanation. I'll try one of those or break my chapters into their own files.