[Resolved] Hiding Table of Contents On Mobile

Home Forums Support [Resolved] Hiding Table of Contents On Mobile

Home Forums Support Hiding Table of Contents On Mobile

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #953426
    Mark

    I cannot get my TOC plugin to format well on mobile Is there a quick CSS I can use to hide it?

    #953430
    Leo
    Staff
    Customer Support

    Hi there,

    If you can add a custom class to the table then you can use the built-in hide-on-mobile class:
    https://docs.generatepress.com/article/responsive-display/#using-our-hide-on-classes

    Let me know if this helps ๐Ÿ™‚

    #953434
    Mark

    Ok, I was trying to do it globally across the site.

    #953436
    Leo
    Staff
    Customer Support

    Where can I find one in your site?

    #953437
    Mark

    Each post has one on the 2nd paragraph. You’ll see on mobile that formating doesn’t look great when expanded.

    #953438
    Leo
    Staff
    Customer Support

    Hmm I wonder if this would work:

    @media (max-width: 768px) {
        .lwptoc{
            display: none !important;
        }
    }
    #953442
    Mark

    Nope, that didn’t do it.

    #953447
    Leo
    Staff
    Customer Support

    Is this what you are referring to?
    https://www.screencast.com/t/gbFFdr7RTeVR

    If so the code should work but I’m not seeing the CSS being added.

    Make sure to clear all caching plugins including Autopimize?

    #953448
    Mark

    No, I’m referring to the “Article Contents” box at the top of the page. It’s the LuckyWP Table of Contents plugin.

    #953450
    Leo
    Staff
    Customer Support
    #953456
    Mark

    It didn’t work but I think I found a workaround. Thanks

    #954123
    Leo
    Staff
    Customer Support

    Awesome ๐Ÿ™‚

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