0

What CSS do you use to remove the box that contains scrollbar, yet leave scrollbar visible?

(Current scrollbar) I want to remove the box that contains the scrollbar, yet leave scrollbar visible

(need to look like this one) This is what I want it to look like

guest
  • 2,185
  • 3
  • 23
  • 46

3 Answers3

1

You can't remove the box of the browser's default scrollbar. I think the only way to achieve this is by using a custom scrollbar. Read this answer of how to do this: https://stackoverflow.com/a/14150577/1119533

Community
  • 1
  • 1
Dion
  • 3,145
  • 20
  • 37
1

You can't do this with CSS...You will have to use custom js plugin to achieve this.

One that looks like what you shownin the image is called slimScroll

DEMO

zoranc
  • 2,410
  • 1
  • 21
  • 34
0

I found this example without the use of JS plugin http://css-tricks.com/examples/WebKitScrollbars/

/* Let's get this party started */
::-webkit-scrollbar {
    width: 12px;
}

/* Track */
::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0); 
    -webkit-border-radius: 10px;
    border-radius: 10px;
}



/* Handle */
::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: rgba(200,200,200,1); 
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); 
}

::-webkit-scrollbar-thumb:window-inactive {
    background: rgba(200,200,200,0.4); 
}
guest
  • 2,185
  • 3
  • 23
  • 46