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

TL;DR
  • Use Webflow's Custom Code tab to add CSS that hides scrollbars.
  • Target specific elements and insert CSS in an HTML Embed using <style> tags.
  • Publish and verify changes across different browsers.

To remove scrollbars on all browsers for elements in a Webflow website, you can use a combination of CSS properties. Here's a reliable method to achieve this:

1. Add Custom Code to Your Webflow Project

  • Go to Project Settings and select the Custom Code tab.
  • In the Head Code or Footer Code section, you can add your custom CSS.

2. Use CSS to Hide Scrollbars

  • Ensure you target the specific elements where scrollbars should be removed.
  • Use the following CSS to hide the scrollbars across different browsers:

/* Hide scrollbars in Webkit browsers like Safari and Chrome */
.selector ::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbars in Firefox */
.selector {
    scrollbar-width: none; /* Firefox */
}

/* General overflow settings */
.selector {
    overflow: hidden;
}

3. Implement the CSS in Webflow

  • Add an HTML Embed near the end of your Webflow Designer page where you want the scrollbars removed.
  • Insert the CSS between <style> tags within the embed, ensuring .selector is replaced with the class of the element you want to target.

4. Publish and Verify

  • Publish your Webflow site to view the changes.
  • Verify by checking the targeted elements on multiple browsers to confirm scrollbars are removed.

Summary

To disable scrollbars across all browsers for elements in your Webflow site, add the necessary CSS using Webflow's Custom Code features. Ensure the CSS targets specific elements effectively.

Rate this answer

Other Webflow Questions