Skip navigation
Currently Being Moderated

Export book to ePub creates many copies of CSS classes

Dec 8, 2011 5:17 AM

Tags: #css #indesign_cs5.5 #book #epub

I'm trying to do my first epub project, using Indesign CS5.5 Mac 10.7.


I followed the instructions in the Help file, created a book, added all my chapters.  Set the first one to be style source.  Synchronized styles and swatches.


However, when I export, I get many variations on what should be the same style, for example if my InDesign style was GRAPHIC, I now have GRAPHIC-1 through GRAPHIC-12 (one for each chapter).  I expected only one, across the book, so I can adjust all the GRAPHIC p tags at once in CSS.  Am I misunderstnding this feature?  If so, how can I accomplish this?


I need to set specs in CSS for all instances of a given book element, and as it stands would need to find/replace across the book in BBEdit to make all similar elements use the same class.



  • Currently Being Moderated
    Dec 8, 2011 1:27 PM   in reply to Handycam

    It is a bug in export filter.

    Mark as:
  • Currently Being Moderated
    Mar 23, 2012 8:49 PM   in reply to Handycam

    You need to create a custom CSS and direct ID to use it in the export settings. And then you need to map all of your paragraph styles in every chapter to styles in that CSS. This is easy to fix if you create a template to house all of your paragraph and character styles because you can then sync all of your chapters automatically to the styles in your template.


    1. In the template's Paragraph Styles panel, selecte Edit All Export Tags from the panel menu. For each style, map it to the appropriate CSS style and class that you set up in your custom CSS file.

    2. From the book panel, select all chapter files and sync them to the template's paragraph styles using the icon in the book panel's toolbar.

    3. From the book panel's menu, select Export Book to EPUB and designate that the custom CSS file be used. (Note that ID uses that file but renames it to template.css during export.)


    I can't empathize enough how important it is that you remove all overrides in your files to keep your CSS clean.

    I found a helpful discussion of some of these issues at -tagging-to-the-rescue/

    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points