# Navigation menu and anchor link problem.

**URL:** <https://community.hubspot.com/t/navigation-menu-and-anchor-link-problem/28092>\
**Category:** Knowledge Base Tool\
**Tags:** professional\
**Created:** [November 17, 2020, 12:41pm UTC](https://community.hubspot.com/t/navigation-menu-and-anchor-link-problem/28092 "2020-11-17T12:41:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ColmK1997](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/colmk1997/32/53869_2.png) [@ColmK1997](https://community.hubspot.com/u/ColmK1997)\
**Post date:** [November 17, 2020, 12:41pm UTC](https://community.hubspot.com/t/navigation-menu-and-anchor-link-problem/28092/1 "2020-11-17T12:41:54Z")

</div>

Hi all,

I have posted this new page on my website and noticed that on a small screen such as laptops a gap appears on top of the naviagtion menu but on a bigger screen a gap doesn’t appear [https://www.sytorus.com/the-data-protection-academy?hs\_preview=iiykXGIx-35748525985](https://www.sytorus.com/the-data-protection-academy?hs_preview=iiykXGIx-35748525985)

Also the anchor link problem is another one that i have come across, the heading gets cut off when i click into each section from the links at the top.

Does anyone how i can fix these two problems so no gap appears and the anchor links appear as they should without any cut off?

---

<div class="post-metadata">

**Author:** ![sharonlicari](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sharonlicari/32/101479_2.png) [@sharonlicari](https://community.hubspot.com/u/sharonlicari)\
**Post date:** [November 18, 2020, 11:34am UTC](https://community.hubspot.com/t/navigation-menu-and-anchor-link-problem/28092/2 "2020-11-18T11:34:29Z")

</div>

Hey @ColmK1997

Thank you for the information provided, I’ll tag a few experts that can share their thoughts with you

Hey @Kevin-C, @stefen @piersg any advice you can share with @ColmK1997?

Thanks  
Sharon

---

<div class="post-metadata">

**Author:** ![Kevin-C](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kevin-c/32/34570_2.png) [@Kevin-C](https://community.hubspot.com/u/Kevin-C)\
**Post date:** [November 18, 2020, 1:34pm UTC](https://community.hubspot.com/t/navigation-menu-and-anchor-link-problem/28092/3 "2020-11-18T13:34:49Z")

</div>

Hey @ColmK1997 and thanks @sharonlicari

Looks like you’ve got a negative margin on the links which maybe causing this issue:

 ![34411i60A143C96C33BFBF.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/5/c/5c4a26ce61cd5e7d1ebdc627b93d0d1a83224b9e.jpeg)

Im not sure the purpose of this negative margin, but making it a positive removes the issue:

```lia-code-sample
.hs-menu-item.hs-menu-depth-1.hs-item-has-children > a {
 margin-bottom: 6px;
}

```

As for the links you’ve got a top: -150px set on them:

 ![34413i2C8D8DA498523C7D.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/5/65410a304300906f646660c49867dee792bd3abd.jpeg)

I would try increasing that negative number to -250px

```lia-code-sample
a[data-hs-anchor="true"] {
 top: -250px;
}

```

---

<div class="post-metadata">

**Author:** ![ColmK1997](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/colmk1997/32/53869_2.png) [@ColmK1997](https://community.hubspot.com/u/ColmK1997)\
**Post date:** [November 18, 2020, 4:03pm UTC](https://community.hubspot.com/t/navigation-menu-and-anchor-link-problem/28092/4 "2020-11-18T16:03:48Z")

</div>

Hi Kevin, that worked thank you.
