• Resolved mooer

    (@mooer)


    Hello.

    I was wondering if it’s possible to style the collapsed “button” of your table of contents block. I would like it to be more visible my making it bigger and change color. I’ve found that changing the title background color changes the color of the collapsed button, but this also changes the background color of the title when the contents are expanded, which looks rather odd (see pictures).

    ————————————pic 1——————————

    ————————————pic 2——————————

    So, my question is if there is any way to edit the collapsed button without editing the expanded block? If possible, are these settings responsive so that the mobile view can be changed individually?

    Thanks,

    mooer

    • This topic was modified 8 months ago by mooer.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Zeba Afia Shama

    (@zebaafiashama)

    Hi @mooer

    I hope you are doing well.

    Yes, currently we don’t have the option to change the TOC Sticky button color or style. But you can use custom CSS to do that.
    Here is the custom code:

    /* Styles for button.eb-toc-button.eb-toc-button-left */
    button.eb-toc-button.eb-toc-button-left {
        background-color: #000;
        color: #fff !important;
        font-size: 20px !important;
        padding: 30px 20px;
    }
    
    /* Media query for mobile devices */
    @media only screen and (max-width: 768px) {
        /* Adjusted styles for smaller screens */
        button.eb-toc-button.eb-toc-button-left {
            background-color: #212579;
            color: #fff !important;
            font-size: 20px !important;
            padding: 30px 20px;
        }
    }
    

    To add the custom code, you can follow this screencast here: https://d.pr/v/GyFB6W

    Or, you can add it from WordPress Dashboard => Appearance => Customizer => Additional CSS

    Let me know how it goes.

    Thank you

    Thread Starter mooer

    (@mooer)

    Works like a charm!

    Thanks for excellent support.

    Plugin Support Zeba Afia Shama

    (@zebaafiashama)

    Hi @mooer

    I’m happy I could assist you! To keep improving our service, would you be willing to spare 30 seconds to leave a review? Your feedback is invaluable to us.

    Thanks in advance!

    Link to review – https://www.ads-software.com/support/plugin/essential-blocks/reviews/#new-post

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Style collapsed table of contents’ is closed to new replies.