Hello Turtle91 and azimuth,
Thank you for your replies!
@Turtle91:
Quote:
In general, the only way to keep something on the same page as something immediately following is to start a new html page with the first item.
So, each chapter should be in their own html page with the chapter title at the top of the page. Your book title, copyright, and all other backmatter should each be on their own page.
|
That's already the case as far as I can tell

The title page, for example, is in its own .xhtml file. That's what you mean, right?
@azimuth:
You're quite right. You're already pointing me in the right direction though.
I "understand" CSS, but I'm far from a proficient user. I've used a template provider to design the book.
As I understand the logic of your example, I might need to redesign the entirety of the epub's CSS...
Here's the title page, for example:
Quote:
<?xml version='1.0' encoding='utf-8'?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Inconnu(e)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" type="text/css" href="stylesheet.css"/>
<link rel="stylesheet" type="text/css" href="page_styles.css"/>
</head>
<body class="calibre">
<p class="block_" lang="fr">TITLE LINE ONE<br class="calibre1"/>TITLE LINE TWO</p>
<p class="block_1" lang="fr"><img src="logo.png" alt="Logo" class="calibre2"/></p>
<p class="block_2">AUTHOR NAME</p>
<p class="block_3" id="calibre_pb_0">PUBLISHER NAME</p>
</body></html>
|
As you can see, there are no <h> tags, the entire thing is structured around <blocks>.
And in stylesheet.css, every <block> is defined, for example:
Quote:
.block_ {
display: block;
font-size: 2em;
letter-spacing: 0.5pt;
line-height: 1.1;
text-align: center;
margin: 40pt 0 0;
padding: 0;
}
|
I've checked out the page you're referring to, the
MobileRead Wiki CSS template. I suppose this is the best practice.
Still, EPUB-Checker returns no errors and the file displays well on Apple Books, Kindle and a number of other readers.
So at this point, I'm unsure what to do. I could try to insert
page-break-after:avoid;, into the blocks, I suppose, and see if that fixes the specific issue. How bad is it to use <blocks> instead of <h>?
Thank you,
AS7