View Single Post
Old 09-02-2013, 12:00 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,086
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by phossler View Post
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


I did get something to work, but I don't know why the it is working the way you see.

Code:
div.sgc-toc-level-2 {
    font-weight: normal;
    font-size: 66%;
    margin-top: 1em;
    margin-left: 0.5em;
}
Percent is the trick
theducks is online now   Reply With Quote