1

HTML:

<div class="container">
    <div class="mainContent"></div>
    <div class="sidebar"></div>
</div>

CSS:

#container {
    min-width: 1170px;
    width: 95%;
    margin-left: auto;
    margin-right: auto;
}

#mainContent {
    min-width: 1200px;
    width: 85%;
    float: left;
}

#sidebar {
    min-width: 200px;
    position: fixed;
    width: 15%;
    display: inline-block;
    margin: 0px 0px 5px 5px;
    vertical-align: middle;
    max-height: 810px;
    overflow: auto;
}

Here mainContent is scrolling with fixed sidebar.

I am trying to give scrolling property for sidebar separately using overflow: auto. But I wish to hide sidebar's scrollbar.Just hide not disabling scrolling.

Can you to tell me how to do this with above properties?

Nithya.K
  • 491
  • 1
  • 7
  • 15

1 Answers1

0

You can try this:

    #mySidenav {
        overflow-x: hidden; 
        -webkit-scrollbar{
        width: 0px;
        background: transparent;
    }
DaFois
  • 2,197
  • 8
  • 26
  • 43
H. Mirza
  • 11
  • 2