Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scroll to anchor with fixed header, content hidden behind header, margin and top padding not working

I'm using smoothscroll.js to navigate my site. It stops on the correct anchor in Firefox, however in Chrome it passes the point on the first click of the link, and pushes the content to the top, hiding the content behind the page. then if you click it again, it aligns correctly. I've seen the problems on other sites as well. Curious to see if others have the same problem. Chrome seems to ignore any top padding or margin or positioning (example: top:20%;).

like image 508
Commandrea Avatar asked Jan 29 '11 08:01

Commandrea


1 Answers

SOLVED: http://nicolasgallagher.com/jump-links-and-viewport-positioning/demo/#method-D

There are several methods available.

like image 72
Commandrea Avatar answered Oct 21 '22 07:10

Commandrea