Locking text box positions?

I have inserted standard and sidebar text boxes in various places in the main body using the visual editor but when I export the book as an ebook, the text boxes aren’t necessarily showing up on the same page. Half of it will show up on one page and then the rest of it will show up on the next page. Is there a way to fix this so there are not “half” text boxes?

Depending on what you are trying to do …

1/ For ebook (ie EPUB exports):
There is no fixed sense of a page, since readers can adjust font sizes etc. Sometimes you are reading on an iphone, sometimes on an Android tablet, sometimes on a Kobo eink device. If what you are worried about is textboxes getting cut in half you could try the following:

Go to Left Menu >> Appearance >> Custom CSS

  • Select : You are currently Editing … Ebook Styles
  • add the following CSS to “Your ebook styles”:
.textbox {
  pagebreak-before: always;
}

This will mean that there is a page break before every textbox. But that might not be what you want?

2/ For PDF exports:
One solution is to “float” your textboxes to the top of the page. The downside is that the textboxes will “move” compared to the text around them. The upside is that textboxes will always be at the top of the page.

To do this:

Go to Left Menu >> Appearance >> Custom CSS

  • Select : You are currently Editing … PDF Styles
  • add the following CSS to “Your PDF styles”:
.textbox {
  -prince-float: top;
}

Another potential solution is to use Sidebar Textboxes, which will float to the top automatically, but depending on the amount of text you are using, might make the page crowded.

Thank you for your response. I may try the page break for epub, but I’m not sure it will be quite what I was hoping for, but I appreciate your support!