Scroll to anchor with a fixed title, content hidden behind the title, margin and top fill don't work

I use smoothscroll.js to navigate the site. It stops at the correct anchor in Firefox, however in Chrome it passes the point the first time the link is clicked and pushes the content up, hiding the content behind the page. then if you click it again, it will align correctly. I have seen problems on other sites. Curious to know if others have the same problem. Chrome seems to ignore top padding or margin or positioning (example: top: 20%;).

+7
source share
3 answers
+10
source

I used Local Scroll (jQuery) for this.

This allows you to make an upper offset.

$.localScroll({ offset: -100 }); 
0
source

This may be due to the new wordpress theme using the html5 header element. I changed my title to a div and it worked fine.

-3
source

All Articles