Is there a reliable custom code to remove scrollbars on all browsers for elements in a Webflow website?

TL;DR
  • Add custom CSS in Webflow's Project Settings under the Custom Code tab to hide scrollbars.
  • Apply the no-scrollbar class to elements in the Designer, ensuring usability is not affected.
  • Preview and publish to see changes across browsers, confirming effective scrollbar removal.

Removing scrollbars from elements in Webflow can help with creating a cleaner design, but it's essential to ensure it doesn't affect usability. Here's how to do it.

​

1. Add Custom Code to Webflow Project

​

  • Go to Project Settings and navigate to the Custom Code tab.
  • Paste the following CSS code into the Head Code section:

  ```css

  <style>

    / Hide scrollbars across all browsers /

    .no-scrollbar {

      -ms-overflow-style: none; / IE and Edge /

      scrollbar-width: none; / Firefox /

    }

    .no-scrollbar::-webkit-scrollbar {

      display: none; / Chrome, Safari, and Opera /

    }

  </style>

  ```

​

2. Apply the Class to Elements

​

  • Open the Designer and select the elements you wish to remove the scrollbar from.
  • Add the class no-scrollbar to these elements.
  • Ensure that hiding the scrollbar does not hinder the overall user experience by testing on different devices.

​

3. Review and Publish

​

  • Preview your changes in the Designer to ensure scrollbars are hidden effectively.
  • Publish your site to see the changes live. Confirm by testing on different browsers (Chrome, Safari, Firefox, Edge).

​

Summary

​

To remove scrollbars from elements in Webflow, add custom CSS to your project's header and apply the no-scrollbar class to desired elements. Always review usability to maintain a pleasant user experience.

Rate this answer

Other Webflow Questions