- This topic has 9 replies, 2 voices, and was last updated 3 years, 3 months ago by
Leo.
-
AuthorPosts
-
January 27, 2023 at 2:06 pm #2511521
Graeme
My sticky header is cutting off my blog article when the table of contents is used. Whenever I click any of the options in the table of contents it takes me to the part of the article but the top part is cut off by the sticky header.
I’ve left an example of a page in the private info
January 27, 2023 at 4:32 pm #2511594Leo
StaffCustomer SupportHi there,
Can you try using GP’s smooth scroll script?
https://docs.generatepress.com/article/smooth-scroll/Then it should account for the height of the header/navigation.
Let me know 🙂
January 31, 2023 at 12:38 pm #2516149Graeme
Thanks smooth scroll worked!
January 31, 2023 at 12:55 pm #2516186Leo
StaffCustomer SupportGlad to hear 🙂
January 31, 2023 at 1:35 pm #2516244Graeme
Sorry to reopen this Leo but can you please check in the private information the page I’m linking. All other link menu items smooth scroll but the top link for “Why Can’t Dogs Eat Raisins?” doesn’t smooth scroll.
I can’t see what I’ve done wrong?
Smooth scroll works for the top link in my other posts so I can’t see what the difference is.
January 31, 2023 at 2:30 pm #2516324Leo
StaffCustomer SupportI don’t see an ID attached to the first headline.
https://www.screencast.com/t/2RmzbGOunwpQJanuary 31, 2023 at 2:41 pm #2516328Graeme
The code snippet is below. It’s the first list item #cant-eat/Why Can’t Dogs Eat Raisins that doesn’t smooth scroll
<!-- wp:list {"style":{"typography":{"fontSize":"18px"}},"className":"smooth-scroll"} --> <ul class="smooth-scroll" style="font-size:18px"><!-- wp:list-item --> <li><a class="smooth-scroll" href="#cant-eat"><strong>Why Can't Dogs Eat Raisins?</strong></a></li> <!-- /wp:list-item --> <!-- wp:list-item --> <li><a class="smooth-scroll" href="#how-many"><strong>How Many Raisins Can a Dog Eat?</strong></a></li> <!-- /wp:list-item --> <!-- wp:list-item --> <li><a class="smooth-scroll" href="#symptoms"><strong>What Are The Symptoms of Raisin Toxicity?</strong></a></li> <!-- /wp:list-item --> <!-- wp:list-item --> <li><a class="smooth-scroll" href="#what-to-do"><strong>What Should I Do If My Dog Eats Raisins?</strong></a></li> <!-- /wp:list-item --> <!-- wp:list-item --> <li><a class="smooth-scroll" href="#treatment"><strong>What Treatment Will a Vet Do For Raisin Toxicity?</strong></a></li> <!-- /wp:list-item --> <!-- wp:list-item --> <li><a class="smooth-scroll" href="#what-now"><strong>What Now?</strong></a></li> <!-- /wp:list-item --></ul> <!-- /wp:list -->January 31, 2023 at 2:49 pm #2516338Leo
StaffCustomer SupportPlease take a look at my previous reply and screenshot again:
https://generatepress.com/forums/topic/table-of-contents-link-cut-off-by-sticky-header/#post-2516324The ID is missing from the actual headline Why Can’t Dogs Eat Raisins? so the link isn’t doing anything.
February 1, 2023 at 11:44 am #2517463Graeme
Ahh! My bad! Thank you Leo.
February 1, 2023 at 11:51 am #2517467Leo
StaffCustomer SupportNo problem 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.