The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS jQuery ScrollTo: (need a bit of help) Re: jQuery ScrollTo: (need a bit of help)


If the Header and links are 80px tall you can then scrollTo the target elements .offset() -80px. scrollTo goes moves the viewport to ‘x’px from the top of the document, so want to move 80px less (-80px).

If the header is going to change height you can get jQuery to calculate the height first.