@ franc --- this may or may not be of help -----
If you are working with epub2, you might take a look at this old thread:
https://www.mobileread.com/forums/sh...d.php?t=270007
If you have a <hr /> or an empty <div> before the "beginofsite" class, you might get spotty results. I am not sure if the same problem would arise if you have <hr /> or empty div after "endofsite".
EDIT TO ADD --- Yes, I just checked --- same problem if <hr /> or empty div comes directly after "endofsite".
As RbnJrg pointed out, I had to add a <p> with some
*text* in it before the page-break-before , even if that text was only a non-breaking space. You could set font-size to .05em to make it virtually invisible. You could also play with the display: none, or visible: hidden; although I never tried those, they might work to hide that paragraph if you need it hidden.
The book in question is posted here in the library
https://www.mobileread.com/forums/sh...d.php?t=270214
Hope you can get it worked out.