How do I remove the scroll bar in Webflow while still allowing scrollable content on the page?

Published on
September 22, 2023

To remove the scroll bar in Webflow while still allowing scrollable content on the page, you can use custom CSS code. Here's how you can achieve this:

  1. Select the element for which you want to remove the scroll bar. This could be the body element, a specific section, or a container.

  2. In the element settings panel, go to the "Custom Code" tab.

  3. Under the "Custom Code" tab, you will find a section called "Add code before ". Click on the "+" button to add a new code snippet.

  4. In the code snippet, add the following CSS code:

body::-webkit-scrollbar {  width: 0.4em;}body::-webkit-scrollbar-thumb {  background-color: #888;}body::-webkit-scrollbar-thumb:hover {  background-color: #555;}
  1. Save and publish your site for the changes to take effect.

Explanation:

  • The ::-webkit-scrollbar pseudo-element is used to target the scrollbar.
  • The width property sets the width of the scrollbar to 0.4em, making it practically invisible.
  • The ::-webkit-scrollbar-thumb pseudo-element is used to target the scrollbar thumb, which is the draggable part of the scrollbar.
  • The background-color property sets the color of the scrollbar thumb to #888 by default, and to #555 on hover. You can customize these colors to match your design.

Note: This solution specifically targets webkit-based browsers (Chrome, Safari). If you want to remove the scroll bar in other browsers as well, you will need to add vendor-specific prefixes for each of the pseudo-elements.

Additional Resources:

Possible alternative search queries:

  • How can I hide the scroll bar in Webflow?
  • Can I remove the scrollbar on a specific element in Webflow?
  • Webflow CSS code to remove scroll bar.