---
title: "💭 How To Create a Custom Scrollbar"
description: "!https://www.w3schools.com/howto/howto_custom_scrollbar.asp"
date: 2023-10-11
published: true
tags:
  - webdev
  - css
  - thought
template: link
---


![https://www.w3schools.com/howto/howto_css_custom_scrollbar.asp](/static/https://www.w3schools.com/howto/howto_css_custom_scrollbar.asp)

Default scrollbars on a dark theme website are just the ugliest thing.  This page covers all the pseudo selectors needed to style the scrollbar.

``` css
/* width */
::-webkit-scrollbar {
  width: 10px;
}

/* Track */
::-webkit-scrollbar-track {
  background: #f1f1f1;
}

/* Handle */
::-webkit-scrollbar-thumb {
  background: #888;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}
```

!!! note

    This post is a <a href="/thoughts/" class="wikilink" data-title="Thoughts" data-description="These are generally my thoughts on a web page or some sort of url, except a rare few don&#39;t have a link. These are dual published off of my..." data-date="2024-04-01">thought</a>. It's a short note that I make
    about someone else's content online <a href="/tags/thoughts/" class="hashtag-tag" data-tag="thoughts" data-count=2 data-reading-time=3 data-reading-time-text="3 minutes">#thoughts</a>
