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
  • 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.

Improve your online store with our extensions.
About: Squarespace Circle Leader since 2017. I value honesty, transparency, appreciation and great design ♥.
Work: Squarespace Developer and founder of SF Digital, building the features Squarespace didn't include™.
Content: Links in my posts may refer to SF Digital products or may be affiliate links.

Buy me a coffee

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.