Memberstack
Pricing
API
Login
Build for free
Memberstack
Pricing
API
Login
Build for free
Memberstack
Pricing
API
Login
Build for free
Blog/How to Build a Sticky Tabs Menu which Scrolls to the Top on Tab Change (Webflow)

How to Build a Sticky Tabs Menu which Scrolls to the Top on Tab Change (Webflow)

This post will teach you how to build a sticky tabs menu in Webflow that automatically scrolls to the top when users switch tabs. You'll learn why this navigation pattern improves user experience and how to implement our cloneable solution for seamless content organization.

Ovidiu·Contributor
|
November 12, 2024·2 min read

How to build a sticky tabs menu which scrolls to the top on tab change (Webflow)

Memberscripts needed

  1. https://www.memberstack.com/scripts/scroll-top-tab-changes

Tutorial

Cloneable

Blog image

Why/Use Cases

- Improve UX by automatically scrolling to the beginning of the tabbed content when switching between tabs.

Building a sticky tabs menu that scrolls to the top when changing tabs on a Webflow site

If you’ve got longer tabbed content on your page, you’ll naturally want the page to scroll back up to the beginning when users switch between tabs.

This guide will help you build a sticky tabs menu and add the scrolling functionality on your site.

To build a sticky tabs menu and add the scrolling functionality on your Webflow site, we’re going to use MemberScript #134 – Scroll to Top When Tab Changes. Follow the link to get the code you’ll need to add to your page and watch a video tutorial on how to set everything up.

Setting it up

Once you’ve created your tabbed content, all you need to do on the page itself is add the following attribute to the tab menu itself:

· ms-code-tab-scroll-top=”-25”

The value is the number of pixels above (negative value) or below (positive value) the tabs menu where the page will scroll to. This can be especially useful if you have a sticky nav menu on your site and don’t want the tabs menu hidden behind it, which is why we’re using 25px in our example.

If you set the value to 0, the page will scroll to exactly the beginning of the tabs menu.

Making it work

Now that you’ve got everything set up in Webflow, all you need to do is add the MemberScript #134 custom code to your page, before the closing body tag.

Conclusion

That’s everything, you can now go ahead and test the tabs on your live site.

If you want to use our demo project to get you started, just click the button below to add it to your Webflow site.

Blog image

Our demo can help you create a sticky tabs menu that automatically scrolls to the top of the tabbed content when users click on a tab.

Take me to Cloneable!‍

Written by

Ovidiu

Contributor

Contents

  • Memberscripts needed
  • Tutorial
  • Cloneable
  • Why/Use Cases
  • Building a sticky tabs menu that scrolls to the top when changing tabs on a Webflow site
  • Setting it up
  • Making it work
  • Conclusion
  • Take me to Cloneable!‍

Share

Explore Memberstack

  • All Features
  • Customer Showcase
  • Templates
  • Find Experts
  • Pricing
  • Help Center

Product

  • Full Feature List
  • User Accounts
  • Gated Content
  • Secure Payments
  • API & Integrations
  • Data Tables
  • Memberstack & Webflow
  • Memberstack & Claude Code
  • Memberstack & WordPress
  • Create a new account
  • 2.0 Log in
  • 1.0 Log in
  • Pricing

Learn about Memberstack

  • Showcase
  • Testimonials
  • Why Memberstack
  • Memberstack vs Outseta
  • Memberstack vs Memberspace
  • Memberstack vs Webflow Memberships

Company

  • About
  • Careers
  • Changelog
  • Partnerships(email)
  • Contact Us(email)
  • X
  • LinkedIn
  • "Do Not Sell My Data" Promise

Resources

  • Vibe Coding
  • Templates
  • Components
  • MemberScripts
  • Data Attributes
  • Find Experts
  • Hiring Guide
  • Webflow Slack Community
  • WordPress Slack Community
  • Support Forum
  • Help Center
  • Blog
  • llms.txt (for AI)
  • llms-full.txt (for AI)
AICPA
SOC

SOC 2 TYPE 1

CERTIFIED

GDPR

COMPLIANT

CCPA

COMPLIANT

Privacy PolicyTerms of ServiceCookie PolicySecurity Policy

© Memberstack Inc. 2018 - 2025. All rights reserved.

Memberstack - The no-code membership platform for any website | Product Hunt