Skip to main content
Participant
October 6, 2024
Question

How to Create a Single Border Around Multiple Paragraph Styles in Reflowable EPUB Export

  • October 6, 2024
  • 2 replies
  • 592 views

Trying to export a reflowable epub with multiple paragraph styles. A few have borders and use different paragraph styles but all need one border around multiple styles instead of breaking them up into separate boxes.

 

<Title renamed by MOD>

This topic has been closed for replies.

2 replies

James Gifford—NitroPress
Legend
October 6, 2024

The 'merging border' feature is exclusive to InDesign. It won't work in an export to EPUB. Even if meticulously set up and working in an ID layout, the paragraphs will separate to individual ones, usually preserving shading, borders, etc. but not merged.

 

The only two ways to get multiple paragagraphs in a single border in EPUB is to put them in a text frame with a defined border (which might behave oddly over virtual page splits), or to create a three-part style as a BORDERED TOP, BORDERED and BORDERED BOTTOM set. Those should be able to be set up to auto-merge in InDesign if the bottom and top styles are children of the base bordered style... but maybe not.

 

The only absolute way to have a bordered paragraph group in both is to use three identical styles in ID (so the borders would be identical and merge) and then redefine the three styles using CSS at export, to give them the different characteristics to blend together in EPUB.

 

Does that make sense? Happy to explain further if that's not enough direction.

 

ETA: In a quick test, this was the best I could do in ID:

which exported (in both Kindle Previewer and Thorium Reader) to this:

 

So to get both of them with perfect merged borders, I think CSS styles will be needed. Use three identical but separately named styles in ID, which will merge perfectly, then tweak them in CSS to adjust the borders and settings on each to more or less match the ID example above.

 

And ETA2: Here's some basic CSS that assumes the three styles are defined in ID with a full border that uses matching settings so the paragraphs merge there:

 

p.BORDER { border-top:none; border-bottom:none; }
p.BORDER-top { border-bottom:none; }
p.BORDER-bottom { border-top:none; }

 

This should result in the paragraphs merged under a continual visible border in EPUB as well.

 

You can, of course, do one or the other — if the only desired format is EPUB, the faults seen in ID don't matter and you can use the simpler approach.

Barb Binder
Community Expert
Community Expert
October 6, 2024

Hi @n19005336:

 

You can have one border around multiple consecutive paragaphs with the same style name, but they wil break into independent borders if you are using multiple styles. 

 

~Barb

 

~Barb at Rocky Mountain Training
FRIdNGE
October 6, 2024

Sorry Barb, it's false!

 

 

(^/)  The Jedi

Robert at ID-Tasker
Legend
October 6, 2024
quote

Sorry Barb, it's false!


By @FRIdNGE

 

Does it work after exporting to ePUB?