user3627406 user3627406 - 1 year ago 79
CSS Question

SmoothScroll scrolls too far

im working on my new portfolio and im having a problem that i cant fix without help.
Here you have a link of my website so far:

What i want is that when you click on creaties the website scrolls too far. To explain it better you have to click on creaties and then remove the white menu bar with inspect element.
After you have done that you can see that there is red color under (behind) the menu bar. That is the problem i want to fix. It should stop scrolling before the red gets behind the white menu bar.

Can you help me fix this? Thanks!

Answer Source

To remove the height you can do this

    scrollTop: target.offset().top - 50 // the height of #MenuBar
}, 1000);


    scrollTop: target.offset().top - $('#MenuBar').height()
}, 1000);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download