Archived topic
Hiding Table of Contents On Mobile
11 replies · Started by Mark on July 9, 2019
I cannot get my TOC plugin to format well on mobile Is there a quick CSS I can use to hide it?
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 :)
Ok, I was trying to do it globally across the site.
Where can I find one in your site?
Each post has one on the 2nd paragraph. You'll see on mobile that formating doesn't look great when expanded.
Hmm I wonder if this would work:
@media (max-width: 768px) {
.lwptoc{
display: none !important;
}
}
Nope, that didn't do it.
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?
No, I'm referring to the "Article Contents" box at the top of the page. It's the LuckyWP Table of Contents plugin.
It didn't work but I think I found a workaround. Thanks
Awesome :)