Hi! I am very very new to this and I can’t seem to figure this out. After using media query may nav bar moves to the top and is fixed, when I click on a tab it takes me to the middle of content rather than header. I have added a margin to the top the size of the nav bar height… maybe someone can have a look at my code on this link please: https://codepen.io/smilgele/pen/ZEaPKop
Have a look at the CSS scroll-padding-top property.
Thank you for taking the time to help. Unfortunately, doesn’t seem to help in this instance, but it’s good to now know another trick.
FYI, I am able to fix your problem by using this property. Which element are you using it on? I don’t want to ruin all the fun, but I will give you a hint, you want to use it on the element that is actually doing the scrolling. Which element do you think is doing the scrolling here?
Ignore me! IT WORKS! I was adding it to a wrong place! Thank you sooooo much!
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.