Skip to main content
Known Participant
August 13, 2025
Question

Epub space between paras

  • August 13, 2025
  • 1 reply
  • 122 views

My InDesign epub is exporting with spaces between some paras throughout the document that are not in the InDesign document. In the para style, there is no space before or after. If it helps pinpoint the problem, when I export the document  with Multi Level TOC style the spaces appear between different paragraphs compared to if I export the then with Navigation TOC set to default. I have exhausted every single option available via Google search, YouTube and hiring a professional graphic designer to try to fix it.

1 reply

Community Expert
October 3, 2025

Hi Ali

 

Thanks for sharing the details  tricky issue, but I think I’ve got a few leads you (or your hired designer) can try. What you report no “space before/after” in InDesign, but unwanted spaces in the EPUB (and changing depending on which TOC mode you use) strongly suggests the problem is in the export HTML / CSS transition, or some hidden style override.

 

Below are steps I would take to diagnose and (hopefully) fix it:

 

Clear overrides / enforce consistent paragraph styles
Make sure all your paragraphs are using the correct paragraph style (no local overrides). Use “Clear Overrides” (or reapply style) to eliminate hidden spacing settings.

 

Check “Space Between Paragraphs Using Same Style” in the paragraph style definition
In recent InDesign versions there’s a setting called “Space Between Paragraphs Using Same Style” which can override or alter spacing behavior. If that isn’t set to “Ignore,” it could insert extra space between otherwise identical paragraphs.

 

Export both ways (with each TOC option), then inspect the EPUB’s CSS / HTML
Unzip the EPUB or open it in an EPUB editor and look at the generated CSS. Check for rules like p + p { margin-top: … } or extra margin or padding on paragraphs. See what differences there are between the “good” export (no extra spaces) and the “bad” one.

 

Remove or override the CSS rule that’s adding space
If you find the CSS rule that’s causing the extra gap, you can either remove it or override it (e.g. set margin-top: 0 for those p + p).

 

Simplify / adjust your TOC style
Since the spacing changes depending on which TOC export mode you use, the TOC style may be causing paragraph breaks or extra wrappers. Try a simpler TOC style or one that does not inject extra wrappers or unusual HTML tags.

 

Inspect for stray blank paragraphs / extra returns
Sometimes invisible blank paragraphs creep in. InDesign’s “show hidden characters” view may reveal extra returns that become real gaps in HTML. Remove them so that the only breaks are the intended paragraphs.

ali_4619Author
Known Participant
October 3, 2025

Brilliant, thanks Eugene.