1

I want to change style of scrollbar of table but even if i tried lots of way it doesn't change.

I want to change background color, border-radius, width and height properties.

My jsfiddle code: https://jsfiddle.net/gulay/1d73h6yt/5/

I also tried to put class name like this:

.tavi-scheduler-table::-webkit-scrollbar-thumb {
      background: #bfbfbf ; 
      border-radius: 10px ;
    }

But it still doesn't work.

One of the what i have tried:

::-webkit-scrollbar-thumb {
  background: #bfbfbf ; 
  border-radius: 10px ;
}
::-webkit-scrollbar:vertical {
  width: 8px ;
}

::-webkit-scrollbar:horizontal {
  height: 8px ;
}
::-webkit-scrollbar-button{
  visibility: collapse ;
}

css code:

.tavi-scheduler-table{
  z-index: 10; 
  position: absolute; 
  bottom:0; 
  left:0; 
  right:0; 
  background-color: white;  
  max-height: 25%;  
  overflow-y: auto;
}

.table-border-top{
  border-top: 3px solid #dee2e6;
}

.close-table-button{
  margin-top: 0%;
}

html code:

<div class="tavi-scheduler-table" *ngIf="isTableOpen">
    <table class="table table-bordered">
      <thead class="table-border-top">
        <tr>
          <th scope="col">{{'report.tavi.tavicalendar.calendar_date'| translate}}</th>
          <th scope="col">{{'report.tavi.tavicalendar.driver_plate'| translate}}</th>
          <th scope="col">{{'report.tavi.tavicalendar.process'| translate}}</th>
          <th scope="col">{{'report.tavi.tavicalendar.status'| translate}}</th>
        </tr>
      </thead>
      <tbody>
        <tr *ngFor="let evn of eventsData"
          [ngClass]="{'scCls': evn.is_past && evn.status, 'failCls': evn.is_past && !evn.status}">
          <td>{{evn.start_text}}</td>
          <td>{{evn.title}}</td>
          <td>{{evn.operation_text}}</td>
          <td>{{evn.status_text}}</td>
        </tr>
      </tbody>
    </table>

  </div>

1 Answer 1

3

try this only:

 ::-webkit-scrollbar {
    width: 10px;
    height: 8px
 }

 ::-webkit-scrollbar-thumb {
    -webkit-border-radius: 10px;
    border-radius: 10px;
    background: #6d6d6d;
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.