View Single Post
Old 03-27-2014, 11:43 PM   #5
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by kovidgoyal View Post
You do not need to add classes, CSS 2.1 selectors can do all this via child selectors. For example for level 1

#calibre_generated_inline_toc > ul > li

For level 2

#calibre_generated_inline_toc > ul > li > ul > li

And just go on adding > ul >li

for every additional level.
As I suggested; however, it does make it more difficult to see at a glance what is affecting what, if you have to count levels like that. But you can easily tell what

#toc_level_1

is doing.

It can't hurt to add classes, can it?
eschwartz is offline   Reply With Quote