1

I'm trying to hide the scrollbar with css but it works on firefox but in Chrome the scrollbar is still there

.tests-container{
    @media (min-width: 1025px) {
        max-height: 600px;
        overflow-y: scroll;
        :-webkit-scrollbar{
            display: none;
        }
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
    
}

1 Answer 1

1

I haven't seen a media query inside a class, so I'll change to this

@media (min-width: 1025px) {
  .tests-container {
      max-height: 600px;
      /* overflow-y: scroll; */

      -ms-overflow-style: none;  /* IE and Edge */
      scrollbar-width: none;  /* Firefox */
  }
  
  .tests-container::-webkit-scrollbar {
    display: none;
  }
}
Sign up to request clarification or add additional context in comments.

1 Comment

I made an example here codepen.io/dshung1997/pen/MWeMOYB. It worked fine on my laptop, Chrome MacOS

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.