Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page-break-after: always not honored #1363

Open
keslert opened this issue Oct 6, 2023 · 2 comments
Open

page-break-after: always not honored #1363

keslert opened this issue Oct 6, 2023 · 2 comments

Comments

@keslert
Copy link

keslert commented Oct 6, 2023

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

Screenshot 2023-10-05 at 9 35 40 PM
@johnfactotum
Copy link
Contributor

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.)

@keslert
Copy link
Author

keslert commented Oct 6, 2023

Great, thanks for the explanation. I'll try one of those or break my chapters into their own files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants