alvarotrigo / fullPage.js

fullPage plugin by Alvaro Trigo. Create full screen pages fast and simple
http://alvarotrigo.com/fullPage/
GNU General Public License v3.0
35.28k stars 7.29k forks source link

paddingTop issue when scrolling back up #3283

Closed AmanSahota closed 6 years ago

AmanSahota commented 6 years ago

The problem I am having is mainly with the fixed header and scrolling back up to the website.

The fixed header is as follows:

header { position: fixed; top: 0; z-index: 99; background: black; width: 100%; }

I am using some padding top to create the space at the top of the sections:

.section { padding-top: 100px; }

when page loads

Everything seems to work fine as expected, however when I scroll down the site and then scroll back up the "padding-top: 100px" seems to sit behind the fixed header? It only happens on the first section.

after scrolling down and back up

Here is a link: http://php.aprilsix.com/purestorage/107634/

Versions

[Firefox 60.0.2, macOS Sieera, MacBook Pro (Retina, 13-inch, Early 2015)]

alvarotrigo commented 6 years ago

Could you please provide an isolated reproduction in jsfiddle or codepen, with no CSS or JS files external to fullPage.js and the minimum amount of HTML code. Use empty sections unless strictly necessary for the reproduction.

Also, try to use the latest fullpage.js verison. 3.0.1, as version 2 won't be maintained anymore. So, in case there's a bug, it will get solved in version3, not version 2.

AmanSahota commented 6 years ago

Thanks for responding.. I have set that up here: https://codepen.io/AmanSahota/pen/XYoYrv

I kept everything in because I am not entirely sure what's causing the section 1 issue

alvarotrigo commented 6 years ago

Hey @AmanSahota , could you please remove any content inside any section to simplify the task of finding the issue? Also please remove any CSS or JS that doesn't belong to fullpage.js

Check my article here regarding how to create an isolated reproduction: https://alvarotrigo.com/blog/how-not-suck-at-asking-coding-questions/

alvarotrigo commented 6 years ago

Closed until an isolated reproduction is provided as detailed in the reporting issues guidelines and the issue skeleton.

AmanSahota commented 6 years ago

I've moved to a new issue as this is closed - #3305