Quote:
Originally Posted by phossler
I can across the CSS content, counter, counter-increment, and counter-reset and thought that these would be a great ( = 'easy') way to number sections and chapters.
Works great (text, TOC, etc.) in Sigil and in Calibre viewer, but in ADE and the Kindle the numbering and the content (like 'Section, 'Topc', 'Area' below don't appear.
Is this a lack of functionality in ADE and Kindle, or is there a workaround?
Code:
body
{
counter-reset:section;
}
h1
{
counter-reset:subsection;
}
h2
{
counter-reset:subsubsection;
}
h1:before
{
counter-increment:section;
content:"Section " counter(section) ". ";
}
h2:before
{
counter-increment:subsection;
content:"Topic " counter(section) "." counter(subsection) " ";
}
h3:before
{
counter-increment:subsubsection;
content:"Area "counter(section) "." counter(subsection) "." counter(subsubsection) " ";
}
Paul
|
I think you found one of the CSS things that is not part of the EPUB spec, but works in some viewers
Rule of thumb: don't count on these kinds of Features, they will fail when you most need them