Table of Contents (HTML)

Get HTML help, style input, and feedback on your pages from other SP members.
User Avatar
Baarb

 
Posts: 408
Joined: Tue Jun 06, 2006 6:42 pm
Thanked: 43 times in 30 posts

Table of Contents (HTML)

by Baarb » Tue Nov 08, 2011 2:14 am

Hi, I was wondering if anyone had made a custom 'Table of Contents' for one of their pages, i.e. selected 'no' when giving the option in the Editor, and then just put in a lot of HTML to create something more customisable, different colours, box dimensions, place on the page etc.? I reckon I could probably work it out but it would be nice to know if there were some existing examples out there. Cheers.

User Avatar
Baarb

 
Posts: 408
Joined: Tue Jun 06, 2006 6:42 pm
Thanked: 43 times in 30 posts

Re: Table of Contents (HTML)

by Baarb » Thu Nov 10, 2011 12:49 am

Well it's not great but it gives you a horizontal TOC instead of a vertical one. Essentially some of the source code for the default TOC placed inside some code for a box from rgg's test page.
Code: Select all
<div align="center"><div style="border-style: solid; border-width: 1px; width: 500px; text-align: center; background-color: LightGrey;"><div><p><strong>Table of Contents: </strong><a href="#chapter_1">Intro</a>, <a href="#chapter_2">Video</a>, <a href="#chapter_3">Sliding</a>, <a href="#chapter_4">Tables</a>, <a href="#chapter_5">HTML</a>, <a href="#chapter_6">Experiments</a>, <a href="#chapter_7">Images</a></div></p></div></div> 

User Avatar
mrchad9

 
Posts: 4545
Joined: Thu Jul 02, 2009 12:01 am
Thanked: 1338 times in 911 posts

Re: Table of Contents (HTML)

by mrchad9 » Thu Nov 10, 2011 1:07 am

Several people change colors, I am not sure how. You could PM and ask. If you find out anything, maybe post it here.

rebelgrizz is one who does this...

http://www.summitpost.org/krinklehorn-peak/758606

Only other option I know of is to 'view source' on the page and try to lift some code.

User Avatar
Baarb

 
Posts: 408
Joined: Tue Jun 06, 2006 6:42 pm
Thanked: 43 times in 30 posts

Re: Table of Contents (HTML)

by Baarb » Fri Nov 11, 2011 6:35 am

Interesting, this'll give you a 4 line TOC, with the second item in purple, and the third item indented, say as a subheading. Would just have to place the code in and align it on the right-hand side to make it look like the default one.

Code: Select all
<div class="toc"><p><strong>Table of Contents</strong></p><div class="toc_list1"><a href="#chapter_1">Intro</a></div><div class="toc_list1"><a href="#chapter_2"><font color="8A2BE2">Video</font></a></div><div style="text-indent: 2em;"><a href="#chapter_3">Images</a></div><div class="toc_list1"><a href="#chapter_4">Tables</a></div></div>


Return to Page Help

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests