Hey guys, just wanted to point out one hidden feature of our smooth-scroll script - it will automatically treat the bottom of any fixed navigation as the "top" of the page. So if you have a fixed header, and scroll to a section, that section will align perfectly with the bottom of the header (instead of having the top of the section be hidden by the header).
In order for this to work, the header must have
position: fixed and has to meet at least one of the following criteria:
- A standard Navbar component directly inside the body
- An element with a class named
Headerdirectly inside the body
- An element that has the
<header>HTML5 tag (specified on the Settings tab)
A few other hidden features that might be useful:
- You can add a custom attribute (on the Settings tab) called
<body>to affect the speed of the scroll. E.g. setting it to
2.0will scroll twice as fast as default, while setting to
0.5will perform a slower scroll.
- You can add a custom attribute called
scrolland set it to
midto scroll a section to the middle of the page (http://forum.webflow.com/t/center-a-section-on-smooth-scroll/1495/12) - this takes into consideration fixed headers as well.