Home › Forums › CSS › Fadein animations and anchor links › Reply To: Fadein animations and anchor links
March 21, 2016 at 2:56 pm
#239661
Shikkediel
Participant
It’s actually positioned correctly since it will scroll the element to the top of the page. To account for the header, you’ll need some JavaScript. Here’s a small script that’ll do a smooth transition :
Then instead of this line :
scrollTop: target.offset().top
You could use this :
scrollTop: target.offset().top-$('header').outerHeight(true);