Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
World desk4 min

How to Add a Custom Scrollbar in WordPress (CSS and No-Code Options)

Customize a WordPress scrollbar with CSS in the Site Editor or Customizer, or use a plugin for no-code controls. Includes scoped examples, browser caveats, accessibility guidance, and troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

You can customize a WordPress scrollbar with CSS or use a plugin when you prefer a settings panel. Add CSS through the Site Editor’s Styles → Additional CSS in WordPress 6.2 and later block themes, or through Appearance → Customize → Additional CSS when your classic theme exposes the Customizer. The CSS is attached to the active theme, so changing themes can remove its effect.

Choose CSS or a plugin

Approach Best for Trade-offs
Custom CSS Precise styling, limited overhead, and control over one scroll container Requires CSS knowledge, depends on the active theme, and needs browser testing
Scrollbar plugin Site owners who want controls without writing code Adds third-party code and creates update, compatibility, performance, and accessibility responsibilities

For a single article panel or menu, CSS is usually the most controlled option. A plugin is more convenient when several site owners need to adjust color, width, speed, borders, radius, alignment, or auto-hide settings.

Where to add scrollbar CSS in WordPress

Block themes: Site Editor

  1. Open Appearance → Editor.
  2. Open Styles, then choose Additional CSS.
  3. Paste your rules and save. WordPress supports custom CSS in the Styles area from version 6.2 onward.

Classic themes: Customizer

  1. Open Appearance → Customize.
  2. Choose Additional CSS.
  3. Paste the rules, preview the result, and select Publish.

These editors store CSS with the current theme. If the project already uses a child theme or a site-specific CSS enqueue process, follow that convention. Do not edit a parent theme’s files directly: a theme update can overwrite those changes.

Apply a restrained page-wide style

The standards-based properties provide a baseline where supported, while the WebKit pseudo-elements allow more detailed track and thumb styling in browsers that implement them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)
/* Standards-based controls where supported */
html {
  scrollbar-color: #6b7280 #f3f4f6;
  scrollbar-width: thin;
}

/* Detailed styling for WebKit-based browsers */
html::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html::-webkit-scrollbar-track {
  background: #f3f4f6;
}

html::-webkit-scrollbar-thumb {
  background: #6b7280;
  border: 3px solid #f3f4f6;
  border-radius: 999px;
}

html::-webkit-scrollbar-thumb:hover {
  background: #374151;
}

The thumb should remain clearly different from the track and large enough to drag. The height rule covers horizontal scrollbars as well as the width rule’s vertical scrollbar.

Style only a specific overflow container

Do not target the whole document when the design calls for a scrollable card, code sample, sidebar, or article panel. First identify the element that actually has scrolling, then scope the rules to its class.

Rank #2
Sale
Logitech G305 Lightspeed Wireless Gaming Mouse - Black
  • The next-generation optical HERO sensor delivers incredible performance and up to 10x the power efficiency over previous generations, with 400 IPS precision and up to 12,000 DPI sensitivity
  • Ultra-fast LIGHTSPEED wireless technology gives you a lag-free gaming experience, delivering incredible responsiveness and reliability with 1 ms report rate for competition-level performance
  • G305 wireless mouse boasts an incredible 250 hours of continuous gameplay on just 1 AA battery; switch to Endurance mode via Logitech G HUB software and extend battery life up to 9 months
  • Wireless does not have to mean heavy, G305 lightweight mouse provides high maneuverability coming in at only 3.4 oz thanks to efficient lightweight mechanical design and ultra-efficient battery usage
  • The durable, compact design with built-in nano receiver storage makes G305 not just a great portable desktop mouse, but also a great laptop travel companion, use with a gaming laptop and play anywhere
.article-panel {
  max-height: 32rem;
  overflow-y: auto;
  scrollbar-color: #6b7280 #f3f4f6;
  scrollbar-width: thin;
}

.article-panel::-webkit-scrollbar {
  width: 10px;
}

.article-panel::-webkit-scrollbar-track {
  background: #f3f4f6;
}

.article-panel::-webkit-scrollbar-thumb {
  background: #6b7280;
  border-radius: 999px;
}

Scoping prevents textareas, nested menus, and unrelated components from inheriting a page-wide treatment. The class must be on the element whose computed styles show overflow-y: auto or overflow-y: scroll.

Understand browser differences

::-webkit-scrollbar, ::-webkit-scrollbar-track, and ::-webkit-scrollbar-thumb are vendor-specific controls documented by WebKit. When a ::-webkit-scrollbar rule is present, WebKit uses the CSS description instead of its built-in scrollbar rendering.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Logitech M185 Compact Ambidextrous Wireless Mouse with Rubber Grips - Blue
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)

scrollbar-width is a standards-based thickness control with auto, thin, and none values. scrollbar-color sets thumb and track colors where supported; it is not a complete cross-browser replacement for every visual detail. A browser may ignore WebKit styling when the computed scrollbar-width is not auto, so do not assume the two systems combine identically.

Test the states that matter

  • A current Chrome- or Safari-family browser and Firefox
  • At least one physical mobile device with touch scrolling
  • Vertical and horizontal overflow
  • Mouse-wheel, touch, keyboard, and zoom behavior
  • Dark mode if the site supports it
  • Forced-colors or high-contrast settings

Keep the scrollbar accessible

Avoid scrollbar-width: none for content that still requires scrolling. Hiding the scrollbar can remove an important cue that more content exists and can make that content harder to discover. Keep overflow enabled, retain clear thumb-versus-track contrast, and do not communicate scrollability through color alone.

Rank #4
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
  • Computer mouse for easily navigating a computer interface; click, scroll, and more
  • USB-A wired connection; if existing device only supports USB-C, an additional adapter will be required
  • High-definition (1000 dpi) optical tracking ensures responsive cursor control for precise tracking and easy text selection
  • 3 buttons offer effortless fingertip control
  • Plug-and-go ready for instant use

If you use a narrow scrollbar, verify that visitors can still drag it and can scroll with a wheel, touch gesture, keyboard, and assistive technology. Check focus movement and zoom after every visual change.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Add a custom scrollbar with a plugin

Plugins are the no-code route. In Plugins → Add New, search for a scrollbar plugin, install it, and activate it. The official WordPress plugin directory includes plugins with a dedicated scrollbar settings screen. Depending on the plugin, controls can include color, width, track background, border, radius, scroll speed, alignment, touch-device behavior, and auto-hide.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Acer Wireless Mouse for Laptop, 2.4GHz Computer Mouse 3 Adjustable 1600 DPI
  • 【Plug and Play for Home/Office/School】The wireless computer mouse features 2.4GHz connectivity, delivering a stable, interference-free connection up to 32ft. Designed for 𝐦𝐞𝐝𝐢𝐮𝐦 𝐭𝐨 𝐥𝐚𝐫𝐠𝐞 𝐬𝐢𝐳𝐞𝐝 𝐡𝐚𝐧𝐝𝐬, it ensures comfortable use all day. Simply plug in the USB-A receiver for instant pairing—no drivers needed. 📌📌 If the mouse isn’t suitable, place the USB receiver in the battery compartment and return both.
  • 【3 Levels Adjustable DPI】This travel USB mouse offers 3 adjustable DPI settings (800, 1200, 1600), allowing you to customize sensitivity for precise design work. Effortlessly switch to match your task and elevate your productivity. 📌 Please remove the film at the bottom of the mouse before use.
  • 【Effortless Browsing】Equipped with forward and backward buttons, this computer mice streamlines your workflow, making it easy to navigate through web pages and files with a simple click. 📌Side button does not work on Mac.
  • 【Visible Indicator Light】 The pc mouse features a visual indicator for DPI levels and low battery alerts. The red light flashes once for 800 DPI, twice for 1200 DPI, and three times for 1600 DPI. When the battery level is below 10%, the light flashes red until the mouse is completely out of power.
  • 【Click to Wake】With smart sleep mode, it saves power by standby after 10 inactive minutes, just 2-3 clicks to wake. This efficient design delivers 3x longer battery life than motion-wake mice. Engineered for durability, its buttons and scroll wheel are tested for 10 million clicks, ensuring long-term reliability and consistent performance.

Typical setup flow

  1. Install and activate a plugin from a source you trust.
  2. Open its settings page; some plugins use a Scrollbar Option Settings screen, while others use Settings → Advanced Scrollbar.
  3. Set a visible width, contrasting thumb and track colors, and any desired radius or speed.
  4. Save, then test the front end while logged out and on mobile.

Before launch, review the plugin’s current update history, WordPress and PHP compatibility, generated CSS or JavaScript, licensing, and accessibility defaults. Directory metadata such as active installations and tested-version labels changes over time and should not be treated as permanent performance evidence.

Troubleshoot a scrollbar that does not change

Nothing changes

  • Inspect the page and find the element with the actual scrolling overflow; a nested container may own overflow-y: auto.
  • Check that the selector matches that element and that the CSS was saved in the active theme.
  • Inspect computed styles for a more-specific theme, page-builder, or plugin rule loaded later.

Firefox ignores the detailed styling

Add scrollbar-color and scrollbar-width to the same scrolling element. WebKit pseudo-elements are not a universal browser API.

A plugin changes every scrollbar

Inspect the plugin’s generated CSS and settings. Scope its rules to the intended container or override them with a carefully targeted selector, and confirm that the plugin has not disabled the default width.

Touch or keyboard scrolling is worse

Recheck mobile touch scrolling, keyboard focus, zoom, and forced-color or high-contrast modes. Restore a wider, visible scrollbar if users cannot reliably identify or operate the scroll region.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Quick Recap

SaleBestseller No. 1
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Product carbon footprint: 3.97 kg CO2e; Contoured shape: Gives you more comfort and control
$14.85
SaleBestseller No. 3
Bestseller No. 4
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Computer mouse for easily navigating a computer interface; click, scroll, and more; 3 buttons offer effortless fingertip control
$9.70

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.