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

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

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.