0

When I click the anchor link, both divs, the ul li one where the "menu" is, and the div with links they point to, shift to the top of the page. I would like it to shift only within that div where the links lead to. (Click on, for example, "any of the red links on the left, and see what happens.) Is there any way this can be done?

I've tried to find answers to similar questions, but couldn't find any. Thank you all in advance.

http://45.32.236.253/test/onama.html

Kosyenka
  • 1
  • 1
  • I think the Problem has to do with overflow: hidden; from body. When you remove it you can scroll to top like when you click on the link. Try to fix the body hight. And add some padding or margin to top for the main container. – Silvan Feb 07 '20 at 17:06

2 Answers2

0

The page is quite messy... Should they link to other pages? Then e.g. <a href="mission.html"> Or do I not understand it correctly?

  • When you click the link, you should get to the another paragraph inside the same text. But it moves the whole div up, to the top of the page. – Kosyenka Feb 07 '20 at 16:35
  • He is referring to the side navigation that starts with "Work Mission". – Robert McKee Feb 07 '20 at 16:44
  • I think you could solve that easily with the Bootstrap scrollspy navigation. Make a navbar of your menu points and link them to the text – Andidollar Feb 08 '20 at 11:51
  • @Andidollar thank you for the advice, I will try it, and hope it's applicable. Also, I will let you know how it goes. – Kosyenka Feb 09 '20 at 09:51
0

I figured what I had to do. Just changing the position of the vertical navigation and text divs from absolute to fixed. Everything works properly then.

Kosyenka
  • 1
  • 1