# Sticky menu with anchor links

**URL:** <https://community.hubspot.com/t/sticky-menu-with-anchor-links/7635>\
**Category:** CMS Development\
**Created:** [February 2, 2018, 11:02am UTC](https://community.hubspot.com/t/sticky-menu-with-anchor-links/7635 "2018-02-02T11:02:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JonnyZOO](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jonnyzoo/32/101739_2.png) [@JonnyZOO](https://community.hubspot.com/u/JonnyZOO)\
**Post date:** [February 2, 2018, 11:02am UTC](https://community.hubspot.com/t/sticky-menu-with-anchor-links/7635/1 "2018-02-02T11:02:33Z")

</div>

Hi there

I’d like to include a sticky navigation menu within [this page](https://www.zoodigital.com/investor-relations-overview?hs_preview=YZZfnsRF-5547760131) that links to the different content blocks below.

Are there any good examples of how this can be achieved in HubSpot?

Maybe something like this: [http://www.zensorium.com/tinke/](http://www.zensorium.com/tinke/)

How would I go about implementing this (while keeping the main navigation at the top)?

Cheers, Jonny

---

<div class="post-metadata">

**Author:** ![Jsum](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jsum/32/20405_2.png) [@Jsum](https://community.hubspot.com/u/Jsum)\
**Post date:** [February 2, 2018, 10:50pm UTC](https://community.hubspot.com/t/sticky-menu-with-anchor-links/7635/2 "2018-02-02T22:50:02Z")

</div>

@JonnyZOO,

I don’t know if your aware but if you add “#elementID” to tthe end if your url and “#elementID” corresponds to the id of an element on the page, then the page will load with that element in focus.

That is the old school method and requires the page to reload and “#whatever” to be appended to the url of the page.

A nicer method would be to use javascript/jquery, specifically a click to scroll function. Here are some results about this:

> <https://stackoverflow.com/questions/14524297/how-to-scroll-to-div-after-click-on-about-or-contact-in-my-menu>

> <https://stackoverflow.com/questions/7717527/smooth-scrolling-when-clicking-an-anchor-link>

> **[Smooth Scrolling | CSS-Tricks](https://css-tricks.com/snippets/jquery/smooth-scrolling/)**
>
> Hey! Before you go too far down the rabbit hole of JavaScript-based smooth scrolling, know that there is a native CSS feature for this: scroll-behavior.

Essentially the idea is that when a menu item is clicked, the page will scroll until the element assigned to it (by class, id, or data-type) will have it’s top at position 0, or the position that you specify.

---

<div class="post-metadata">

**Author:** ![JonnyZOO](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jonnyzoo/32/101739_2.png) [@JonnyZOO](https://community.hubspot.com/u/JonnyZOO)\
**Post date:** [February 13, 2018, 9:39am UTC](https://community.hubspot.com/t/sticky-menu-with-anchor-links/7635/3 "2018-02-13T09:39:06Z")

</div>

Thanks @Jsum, this is something we’ve implemented on previous pages, for example the ‘Reach audiences everywhere’ link here: [https://www.zoodigital.com/contact](https://www.zoodigital.com/contact)

The trouble with this investors page is that I need to add a sticky sub-menu, with anchor links for the different sections.

I’m not sure on the best way to implement this through HubSpot. Would it make sense to add another menu underneath the header? Or create something that stays in place along the left-hand side?

How would I go about adding this to the template?
