View Single Post
Old 09-02-2013, 09:13 AM   #1
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Formatting sgc-toc.css font-size

I've been following another interesting thread here about TOC's and sgc-toc.css and saving it in preferences

I've got most of it the way I want, but for some reason known only to CSS, the level-1 font-size is applied to everything

I think I'm getting tangled up with all the nested <div> tags that Sigil's Make HTML TOC creates

Code:
div.sgc-toc-title {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 1em;
    text-align: center;
}

div.sgc-toc-level-1 {
    font-weight: bold;
    margin-top: 2em;
    font-size: 2em;
    margin-left: 0em;
}

div.sgc-toc-level-2 {
    font-weight: normal;
    font-size: 1em;
    margin-top: 1em;
    margin-left: 0.5em;
}

div.sgc-toc-level-3 {
    font-size: 1em;
	margin-top:1em;
    margin-left: 1em;
}

div.sgc-toc-level-3 + div.sgc-toc-level-3 {
	margin-top:0em;
}
I wanted toc-1 to be 2em, and the rest 1em. For everything else (margins, indents) it works as I'd expect

Any ideas?

Thanks

Paul
Attached Thumbnails
Click image for larger version

Name:	Capture.JPG
Views:	366
Size:	91.2 KB
ID:	110332  
Attached Files
File Type: epub Text TOC CSS.epub (3.9 KB, 310 views)
phossler is offline   Reply With Quote