Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


How to avoid Page Break for Epubs - .avoidbreak { page-break-inside: avoid; }

Participant ,
Aug 17, 2021 Aug 17, 2021

Copy link to clipboard

Copied

Hi everyone,

 

I am trying to group elements in Indesign for an epub using the following CSS rule:

 

.avoidbreak { page-break-inside: avoid; }

 

I would like to keep the picture and body text paired, if possible.

 

The HTML code that Indesign exported is below. I tried wrapping everything in a DIV and giving it the class “avoidbreak,” but it doesn't work.

 

Is there a way to accomplish this? I am very familiar with CSS but nothing I’ve tried has produced desirable results.

 

Thanks.

 

Mark

 

<div class="avoidbreak">

<div class="_idGenObjectLayout-1">

<div id="_idContainer004" class="imageBorder">

<img class="_idGenObjectAttribute-1" src="image/300ppi.png" alt="image text" />

</div>

</div>

<div id="_idContainer005" class="Basic-Text-Frame breakabove">

<p class="captionText"><span class="boldText _idGenCharOverride-1">Ribus molorit ianihic</span> itibust qui officii ssitemolupta ditas dolorib usandenem con comnit qui tem sed quunt, offici ant vendus aut velessimet endant eumquunt quia in provitis ea porum nosanduntem.</p>

</div>

</div>

TOPICS
EPUB, How to, Publish online

Views

45

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Sep 05, 2021 Sep 05, 2021

Copy link to clipboard

Copied

LATEST

class="Basic-Text-Frame breakabove"

This has a spacebar space in the code. That might break it. What if it had a hyphen instead?

Mike Witherell

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines