Confusion about ID selectors generated by InDesign

Learn / Forums / EPUB and eBook / Confusion about ID selectors generated by InDesign

Viewing 1 reply thread
  • Author
    Posts
    • #103531
      George Krompacky
      Participant

      I see that ID has made great improvements in its EPUB export capability over the last couple of years, in terms of the code being cleaner.

      In the “Edit All Export Tags” dialog, I have all the “Include in HTML” boxes ticked for my styles that have tags with classes, and all the “Emit CSS” boxes are unticked.

      Yet no matter how I switch up the options, for the first paragraph of each chapter in the book, an ID selector is applied by InDesign, e.g.:

      with “Include in HTML” unchecked:
      <p id=”_idParaDest-9″>This is the Chapter Title</p>

      with “Include in HTML” checked:
      <p id=”_idParaDest-9″ class=”title”>This is the Chapter Title</p>

      It’s a minor thing but trying to wrap my head around it is driving me nuts.

      The other thing is that–if ANY classes are included in HTML–I get a DIV wrapped around the text. If NO classes are included in HTML, there is no DIV wrapped around the page.

    • #103756
      Aaron Troia
      Participant

      Hey George,

      Do you have a linked TOC or did you use InDesign to generate a TOC? If so, those ID selectors are most likely the locations to where your TOC is linking to. Check your TOC links and they will probably be at the end of the link. Also, I believe the “Emit CSS” option applies more to classes than ID’s, as ID’s, while you can apply CSS to them, are more like physical addresses in your HTML for you to be able to link to.

      As far as the “include in HTML” feature. This is for things like italics where you just need an <i> tag, previously InDesign would force you to included a class or it would just insert your character style name as the class which was really annoying. this feature was supposed to eliminate the need for having to include classes for tags if they werent needed (e.g. i, b, em, strong, small, sup, sub, etc.). that being said, you will notice with italics that if you uncheck “Include in HTML” and export, you will not have any italic tags at all for some reason.

      Anyway I hope some of it made sense and possibly answered some of your questions.

      Aaron

Viewing 1 reply thread
  • You must be logged in to reply to this topic.
>