Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7419011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:59:11+00:00 2026-05-29T07:59:11+00:00

How can I drop the CSS property ::-webkit-scrollbar from a single HTML element? In

  • 0

How can I drop the CSS property ::-webkit-scrollbar from a single HTML element?

In my CSS file, I have this code:

::-webkit-scrollbar {
    width:  6px;
    height: 6px;
    background-color:transparent;
}
::-webkit-scrollbar-track {
    background-color:transparent;
    width: 6px;
}
::-webkit-scrollbar-track-piece  {
    background-color: blue;
}
::-webkit-scrollbar-thumb {    
    background-color: #d4dee8;
    width: 6px;
}

It will replace every scrollbar with webkit scrollbars. But there are two places where I don’t need webkit scrollbar, I need normal scrollbars instead.

HTML file:

<td class="viewDialogLabel" height="21" style="width:156px;padding:0px"> 
    <!-- Inner elements --->
</td>

Here, I need to change class viewDialogLabel to normal scrollbars.

How do I get this effect?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T07:59:12+00:00Added an answer on May 29, 2026 at 7:59 am

    WebKit supports the handy CSS value initial, which sets properties back to the values they would have had if no styles applied to the page.

    So, you can reset the ::-webkit-scrollbar values you’ve set like this:

    .viewDialogLabel::-webkit-scrollbar {
        width: initial;
        height: initial;
        background-color:initial;
    }
    .viewDialogLabel::-webkit-scrollbar-track {
        background-color:initial;
        width: initial;
    }
    .viewDialogLabel::-webkit-scrollbar-track-piece  {
        background-color: initial;
    }
    .viewDialogLabel::-webkit-scrollbar-thumb {    
        background-color: initial;
        width: initial;
    }
    

    See http://jsfiddle.net/uVGKr/


    WebKit also supports the :not() selector, so I would have thought the following amendment to your original CSS would prevent the custom scrollbars from applying to that table cell:

    :not(.viewDialogLabel)::-webkit-scrollbar {
        width:  6px;
        height: 6px;
        background-color:transparent;
    }
    :not(.viewDialogLabel)::-webkit-scrollbar-track {
        background-color:transparent;
        width: 6px;
    }
    :not(.viewDialogLabel)::-webkit-scrollbar-track-piece {
        background-color: blue;
    }
    :not(.viewDialogLabel)::-webkit-scrollbar-thumb {
        background-color: #d4dee8;
        width: 6px;
    }
    

    However, it doesn’t work for me in Chrome 16 — the custom scrollbar styles aren’t applied at all (see http://jsfiddle.net/uVGKr/1/). I’m not sure if I’m doing something wrong, if you just can’t combine these selectors, or if this is a WebKit bug.

    As per your suggested edit removing the td selectors from the CSS, this seems to be working in Chrome 24 at least: http://jsfiddle.net/uVGKr/2/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

learning html/css here. I can't seem to understand how to tweak this drop down
I have a drop down menu with css file and i want to convert
I can drop a table if it exists using the following code but do
I can drop a SqlServer Backup Device using SQL-DMO using the following pseudo-code: SQLDMO.SQLServer2
I heard somewhere that you can drop down to C++ directly inside C# code.
How can I drop a file(or select to open it in Finder) of a
how can i get the ID from the current Draggabe Item? <style type=text/css> .red{
One final question with my CSS drop down box! I can not seem to
Looking for the best approach for a non-image CSS Drop Shadow technique. I have
I have this problem with CSS round corners. The link to example is here:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.