Entrance Chat Gallery Guilds Search Everyone Wiki Login Register

Welcome, Guest. Please login or register. - Thinking of joining the forum??
November 16, 2025 - @684.27 (what is this?)
Activity rating: Three Stars Posts & Arts: 48/1k.beats ~ Boop! The forum will close in 316.beats! Unread Topics | Unread Replies | My Stuff | Random Topic | Recent Posts Start New Topic  Submit Art
News: :seal: Thank you for today! :seal: Guild Events: Melon Jam 2025

+  MelonLand Forum
|-+  World Wild Web
| |-+  ✁ ∙ Web Crafting
| | |-+  ☔︎ ∙ I need Help!
| | | |-+  customizing scroll bars?


« previous next »
Pages: [1] Print
Author Topic: customizing scroll bars?  (Read 2341 times)
morrysillusion
Jr. Member ⚓︎
**
View Profile WWW


⛺︎ My Room

Artifacts:
First 1000 Members!Joined 2022!
« on: July 09, 2022 @998.39 »

ive been a bit slow on my website coding lately but, as ive been planning a new shrine page i realized i really wanted to make all elements immersive, and one thing ive failed to figure out it... custom scroll bar. if this something that can be changed just with html/css? or do i need to do a bit more?

ive had a weirdly hard time finding concrete answers about this that can keep my code as simple as possible, tbh. so im not entirely sure how it works to change that. any links or explanations appreciated! again id like to keep things simple but, dont mind having to use a bit of javascript if thats where this goes.

when i customaizing, i mean: changing the color mainly. but being able to change the shape, width, etc too.
Logged

Melooon
Hero Member ⚓︎
*****
View Profile WWWArt


So many stars!
⛺︎ My Room
SpaceHey: Friend Me!
StatusCafe: melon
iMood: Melonking
Itch.io: My Games
RSS: RSS

Guild Memberships:
Artifacts:
ball ;-;Known Apple shillcoolest melon on the web!Emergency feel-good teaa silly heart 4 melon :)Hyperactive Donut
« Reply #1 on: July 09, 2022 @16.69 »

Ok so I only recently figured this out by snooping cinnis code and mixing it with old code from my site :ohdear:

You need to do it differently for Firefox and Chrome/Safari! Here is the code from my site:

Code
/* Scrollbar styles */
/* Firefox */
* {
  scrollbar-color: #cd7c00 #000020;
}

/* Chrome + Safari */
::-webkit-scrollbar {
  background: #000020;
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #000020;
}

::-webkit-scrollbar-thumb {
  background: #cd7c00;
  border-radius: 10px;
}

On the Firefox version the first colour is the bit you drag and the second colour is the background; note the * will make it chnage EVERYTHING that can scroll, if you only want to change the body scroll or scrolls within iframes you can change * to "body" or "iframe" etc
The Chrome/Safari version has WAY more options, you can do some really intense customisation on it, but at its simplest, the first 2 affect the background and the thumb is the bit you drag!

Documentation for Firefox version: https://css-tricks.com/almanac/properties/s/scrollbar-color/
Documentation for Chrome version: https://developer.mozilla.org/en-US/docs/Web/CSS/::-webkit-scrollbar (Im aware the irony that this is the Mozilla documentation :omg:k:smile:

I know this is a bit clunky and MAYBE there is a better way to do it, but Iv not found one, if anyone knows better please correct me!
Logged


everything lost will be recovered, when you drift into the arms of the undiscovered

Artifact Swap: Lasagna
morrysillusion
Jr. Member ⚓︎
**
View Profile WWW


⛺︎ My Room

Artifacts:
First 1000 Members!Joined 2022!
« Reply #2 on: July 09, 2022 @823.82 »

thank you very much! i seemed to hear there was a difference for browsers too but some pages just said firefox flat out didnt work at all-- i will def take a look at this and try it out!
Logged

IndigoGolem
Jr. Member ⚓︎
**
View Profile WWW


⛺︎ My Room

Artifacts:
Joined 2025!
« Reply #3 on: November 13, 2025 @842.64 »

That's pretty cool. My everyday browser supports this and i never noticed until now that the scroll bar is purple here.

It doesn't work in Dillo or NetSurf with their different rendering engines and limited CSS support, nor in CSS-less browsers like Alhena and Links2. It's great in Vivaldi and LibreWolf though.
Logged

Pages: [1] Print 
« previous next »
 

Melonking.Net © Always and ever was! SMF 2.0.19 | SMF © 2021 | Privacy Notice | ~ Send Feedback ~ Forum Guide | Rules | RSS | WAP | Mobile


MelonLand Badges and Other Melon Sites!

MelonLand Project! Visit the MelonLand Forum! Support the Forum
Visit Melonking.Net! Visit the Gif Gallery! Pixel Sea TamaNOTchi