Community Central
Community Central
No edit summary
No edit summary
 
Line 15: Line 15:
 
::Thanks! Just wondering, but is it also possible to remove a header of your choice from the TOC by using a Magic Word? ---'''''[[User:Zantam03|<span style="color:Black;">Zantam03</span>]]'''''<sup> '''''([[User talk:Zantam03|<span style="color:Black;">Talk</span>]])'''''</sup> 15:25, May 2, 2012 (UTC)
 
::Thanks! Just wondering, but is it also possible to remove a header of your choice from the TOC by using a Magic Word? ---'''''[[User:Zantam03|<span style="color:Black;">Zantam03</span>]]'''''<sup> '''''([[User talk:Zantam03|<span style="color:Black;">Talk</span>]])'''''</sup> 15:25, May 2, 2012 (UTC)
 
:::I think that would be accomplished by putting the header in a div, and using a class that uses similar CSS formatting as in above example. ~ [[User:Flightmare|Flightmare]] 16:15, May 2, 2012 (UTC)
 
:::I think that would be accomplished by putting the header in a div, and using a class that uses similar CSS formatting as in above example. ~ [[User:Flightmare|Flightmare]] 16:15, May 2, 2012 (UTC)
  +
  +
::::I'm sure you could find an appropriate [http://www.w3schools.com/cssref/css_selectors.asp CSS selector] to hide any header in the toc on any page, but this only '''hides''' the headers and might cause inconsistencies in the list of contents. I'm not aware of any magic words that would do that though. <span style="font-size:125%; font-weight:bold; font-family:Trebuchet MS, Helvetica, sans-serif; text-shadow:0 0 0.05em #646464">— [[User:Sovq|Sovq]]</span> 19:04, May 2, 2012 (UTC)

Latest revision as of 19:04, 2 May 2012

Forums: Index Support Requests Can I remove level 1 headers from TOC?
Fandom's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.
Archive
Note: This topic has been unedited for 4370 days. It is considered archived - the discussion is over. Information in this thread may be out of date. Do not add to unless it really needs a response.


Hello all, I was wondering if it's possible to remove level 1 headers from the table of contents? If yes, how? ---Zantam03 (Talk) 14:37, May 2, 2012 (UTC)

I guess the no-brainer method would be:
.toclevel-1 > a {display:none;}
.toclevel-1 > ul {margin-left: 0 !important;}
in your desired style sheet page, but this still leaves the subsections with the 1.1, 1.2, 1.2.1, etc. prefixes. Some JavaScript would probably be required to exclude the H1 headers from being added in the first place, as opposed to just hiding them with CSS. Sadly, I'm not a script wizard. Sovq 15:05, May 2, 2012 (UTC)
Thanks! Just wondering, but is it also possible to remove a header of your choice from the TOC by using a Magic Word? ---Zantam03 (Talk) 15:25, May 2, 2012 (UTC)
I think that would be accomplished by putting the header in a div, and using a class that uses similar CSS formatting as in above example. ~ Flightmare 16:15, May 2, 2012 (UTC)
I'm sure you could find an appropriate CSS selector to hide any header in the toc on any page, but this only hides the headers and might cause inconsistencies in the list of contents. I'm not aware of any magic words that would do that though. Sovq 19:04, May 2, 2012 (UTC)