Site logo

[Resolved] manual TOC on left side bar css help.

Home Forums Support [Resolved] manual TOC on left side bar css help.

Home Forums Support manual TOC on left side bar css help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2494108
    SUNBIN

    I want TOC on left side bar so i read some article and made it like this.

    There are 3 classes (table-of-contents, toc-heading, toc-contents)
    Because i made Heading and List into group.
    So group is table-of-contents
    Heading is toc-heading
    List is toc-contents

    But,
    the style i want is like a table (see * on image)
    how can i make it?

    Here is my style
    https://imgur.com/ATBUM71
    Here is what i want
    https://imgur.com/2rhdt6l

    The css i used is (honestly i dont like this style)

    .table-of-contents {
    padding: 20px;
    }

    .toc-heading {
    font-weight: 900;
    font-size: 10px;
    }

    ul.toc-contents {
    margin-top: 0em!important;
    margin-left: 0em!important;
    }

    .toc-contents li {
    list-style-type: none;
    position: relative;
    }

    .toc-contents a {
    font-size: 15px;
    color: #000000;
    text-decoration: none!important;
    }

    .toc-contents a:hover {
    color: #585858;
    border-bottom: 2px solid #585858;
    }

    .toc-contents li:before {
    content: “➜➜”;
    margin-right: 1em;
    color: #585858;
    left: -30px;
    position: absolute;
    }

    #2494379
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to a page on your site where i can see the TOC?

    #2494394
    SUNBIN

    Sure.
    Check please

    #2494476
    David
    Staff
    Customer Support

    Try changing your CSS to this:

    .table-of-contents {
        padding: 20px;
    }
    
    .toc-heading {
        font-weight: 900;
        font-size: 10px;
    }
    
    .table-of-contents ul.toc-contents {
        margin-top: 0em;
        margin-left: 0em;
        padding: 40px 0;
    }
    .toc-contents li:first-child {
        border-top: 1px solid;
        border-color: #4444;    
    }
    .toc-contents li {
        list-style-type: none;
        position: relative;
        border-bottom: 1px solid;
        border-color: #4444;
    }
    
    .toc-contents a {
        display: flex;
        font-size: 15px;
        color: #000000;
        text-decoration: none;
        padding: 10px;
    
    }
    .toc-contents li a:after {
        content: '➜➜';
        margin-right: 1em;
        color: #585858;
        margin-left: auto;
    }
    .toc-contents a:hover {
        color: #585858;
        background-color: #efefef;
    }
    #2494875
    SUNBIN

    Thx david.
    It works

    #2495108
    David
    Staff
    Customer Support

    Glad to hear that

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.