james
james

Reputation: 570

scrollbar track appears randomly

I'd like for my divs to not have that white area (where the scroll bar thumb appears). I'm not sure how to recreate this because it appears randomly on chrome and safari.

enter image description here

this is the div

.column-content{
  height:60vh;
  padding: 10px 3px 0 3px;
  overflow:scroll;
  touch-action: none;
  @media screen and (min-height:1100px){
    height: 70vh;
  }
}

I need it scrollable but I also don't want that ugly white bar to show up... I've tried setting the webkit scroll track on my index.html file but it doesn't do anything.

Upvotes: 0

Views: 724

Answers (1)

Neil
Neil

Reputation: 400

maybe you are searching for the webkit-scrollbar ?

.column-content::-webkit-scrollbar { 
    display: none; 
}

but as it is webkit, it's not compatible with all browsers. aslo you set overflow:scroll, do you need scrolling on the two axis ? if not, you can consider setting it to auto.

Upvotes: 1

Related Questions