[pmwiki-users] Customizing the look for PageTableOfContents

John Rankin john.rankin at affinity.co.nz
Tue Sep 20 17:58:17 CDT 2005

On Tuesday, 20 September 2005 8:12 PM, Robert Riebisch <rr at bttr-software.de> wrote:
>I just added the line:
>  $HTMLStylesFmt['tocf'] = ".toc { width: 33%; }";
>That's what I wanted. see the result at
>Hopefully last question: How can I make the font smaller than "smaller"?

Two points:

1. By setting $HTMLStylesFmt['tocf'] = ...
   you are over-writing the predefined value -- this may not be
   your intention. As a result, the size is coming out as the normal
   font size for the page. I assume that an $HTMLStylesFmt['tocborder']
   (from an earlier email) is controlling the border.

2. So, to get what you want, try the following:

    $TocSize = '10px';
    $HTMLStylesFmt['tocborder'] = "
        div.toc { 
            width: 33%;
            border: 1px solid #cccccc;
            padding: 4px;
            background: #f7f7f7; 
    include the script

Now, with $TocFloat still false, the script will set
    $HTMLStylesFmt['tocf'] = "
        div.toc { font-size: 10px; margin-bottom: 10px; }";

and all should be well... 

(A counsel of perfection would be to use the golden section rather 
than 33% -- roughly 38.2%)


John Rankin

More information about the pmwiki-users mailing list