Jump to content

Attaching Anchor Points to the Main Navigation menu in the header

Recommended Posts

I have found numerous tutorials on how to add anchor point navigation to buttons and text, but nothing that explains how (or if) you can add jumping to an anchor point to the Main Navigation links in the header.

In other words, I want to be on the Home page, click on "About" in the main navigation in my header, and have the page scroll to that section of the Home page. However, the main navigation appears to be able to only go to new pages instead of staying on the current page and scrolling to an anchor point. I don't see a way of adding a url or any code to the main nav at the top of my site. 

Is there any way of doing this? Thanks.

Link to comment
  • Replies 2
  • Views 1.3k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

8 hours ago, justmebyron said:

I don't see a way of adding a url or any code to the main nav at the top of my site.

You can add links to your navigation. See Adding index page anchor links.

Me: I'm Paul, a SQSP user for >18 yrs & Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL. We provide high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji. Buying a coffee is generous but optional.

Would you like your customers to be able to mark their favourite products in your Squarespace store?

Link to comment
  • 1 month later...

But if he wants to create a link to another section on his page, he will have to:

add html code w/ the id anchor link

and then

add the #anchor link in the nav item.

ANDDDD..... if you have a fixed header he will need to add a class to the html code, and create a custom class and add it to the CSS tab. 

/*html code block */
<span id="my-anchor-link" class="anchor"></span>
/*css code block*/
.anchor:before { 
	display: block; 
 	content: " "; 
  	height: 150px;      /* Give height of your fixed element */
        margin-top: -150px; /* Give negative margin of your fixed element */  	
        visibility: hidden; 
}

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.