JBint Posted September 21 Share Posted September 21 (edited) Hi Hoping someone can advise, I am drafting a new blog and wanted to create a "table of contents" that readers can jump to a specific section on the page. I found a 3 step code to do this through https://mishkinart.com/blog/squarespace-table-of-contents/ 1. CSS CODE [see attached screen shot from website above] 2. ANCHOR LINKS [see attached screen shot from website above] 3. HTML CODE [see attached screen shot from website above] I was able to set everything up. BUT... When I click the table of content item, it jumps down the blog BUT past the actual item title, so you have to scroll back up to see the item title. Here is the link to the blog post so you can see how it's jumping past the item. https://www.jennbutterworthinteriors.com/blog/multi-purpose-magic-creating-versatile-rooms-in-small-spaces-taz36#storage Any advice or help as to how to tweak so that the jump link takes you to the title on the blog page would be very much appreciated. Thanks Jenn Edited September 22 by JBint Link to comment
Solution tuanphan Posted September 23 Solution Share Posted September 23 Hi, Because your header is sticky on scroll, it partially covered the top of the screen, you can consider disable sticky header on blog posts only, or on blog post where you use anchor links (If you want this, you can use below code). Code should be at Website > Website Tools (under Not Linked) > Custom CSS /* disable blog posts header sticky */ body[class*="type-blog"].view-item header#header { position: absolute !important; } But another way, you can follow this guide to fix that problem https://www.will-myers.com/articles/perfect-anchor-links-in-squarespace Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
JBint Posted September 23 Author Share Posted September 23 @tuanphan thank you so much! the code you sent worked. I will also check out the post you shared. appreciate your help! tuanphan 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment