Hide div's ScrollBar with overflow: auto

3

I have a% d% d that groups all site content with the following css:

margin: 15px 12px;
background: #fff;
padding: 20px;
height: calc(100vh - 30px);
overflow: auto;

My body has .content different, to simulate a border. It's 100% functional, however, I want to remove that sidebar from the side of the main div. If I put background: #222 in my overflow: hidden; , Scroll disappears along with the possibility of scrolling the page. Any solution in jQuery or even pure CSS (which works, too, outside of Chrome)?

    
asked by anonymous 03.11.2016 / 23:03

1 answer

2

On StackOverflow in English you have answered a similar question, which I believe will solve your problem: link

.div {
    background-color: red;
    position: relative;
    height: 214px;
    overflow: hidden;
    width: 452px;
    margin: 0px auto;
}
#inner{
    width: 100%;
    overflow: auto;
    height: 100%;
    padding-right: 15px;
}

In this issue they left an example in the fiddle: link

    
03.11.2016 / 23:23