To achieve smooth scrolling when linking to another section within the same page in Webflow, you can follow these steps:
1. Select the element that you want to use as the link (e.g., a text link or a button).
2. Go to the element's settings panel on the right-hand side of the designer.
3. Under the Settings tab, find the Link settings section.
4. Click on the "+" button to add a link.
5. In the Link field, type "#" followed by the ID of the section you want to scroll to (e.g., "#section-name").
- To set the ID for the destination section, select the section, go to the Element settings panel, and enter an ID in the HTML Attributes section. Make sure the ID is unique.
6. Click on the "Open link in new tab" option to disable it (unless you specifically want the link to open in a new tab).
7. Now, to enable smooth scrolling, you will need to use custom code.
8. Open the Project Settings by clicking on the "gear" icon in the top-right corner of the designer.
9. In the Project Settings panel, click on the Custom Code tab.
10. In the Head Code section, paste the following code:
```html
```
11. Save the changes and publish your site.
With this code, clicking on any links with a "#" followed by an ID will trigger a smooth scroll animation to the corresponding section on the same page.
Note: If you are using Webflow's new Interactions 2.0, you can achieve smooth scrolling without custom code by utilizing the "Page Trigger" interaction option. However, this feature is only available for certain paid plans.