Thread: <h2 title="xx">
View Single Post
Old 04-17-2022, 07:11 PM   #8
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,164
Karma: 4917718
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by hobnail View Post
Another Sigil user here. A possible trick that might be useful.

I also use the title= thing.

Code:
<h2 title="One - The storm">One <span>The storm</span></h2>
In my CSS I have

Code:
h2 span, h1 span {
    display: block;
}
This puts the chapter number on a separate line above the title, or more correctly, the chapter title is on a separate line below the chapter number. I also have additional styling to make the chapter number small caps and the title bold. The table of contents just gets the chapter title, no number.

I think it was turtle91 who shared this trick.
Thanks @hobnail, I'll give it a try. Am I right in thinking it is another method to achieve the same outcome? So I can either have a css code for "chapterh2" or css code for "h2 span". Its not really saving anything, (but of course I probably don't have a deep enough understanding to see the differences between the two methods).



Quote:
Originally Posted by JSWolf View Post
Make the chapter number <h1 and the chapter title <h2 but you have to use classes or define <h1 and <h2 in CSS.
h1 and h2 are already in use.
h1 is on the title page (thought I could probably get rid of that)
h2 is used for the parts of the book which are split into days - "Day 1- Contact" and h3 is used for the chapters in "Day 1"

Just to confirm that my issue is with the creation of the TOC which omits the title="" portion of the heading.
Karellen is online now   Reply With Quote