0

I know that there are almost the same questions related to scrollbars with some good answers, unfortunately that did not work for me. I want to hide scrollbars leaving scrolling functionality. Here is what I have:

<div class="sidebar">
     <div id="status"> </div>
 <..li items etc >  
    </div><!-- END SIDEBAR -->

And my CSS,

.sidebar {
 overflow: hidden;
 height: 90%;
}
.sidebar .#status {
 overflow:scroll;
}
My status id div is empty initially, and I have some list items (links) after it, what I am doing is that my status id div is being filled with li elements via ajax, since there are many of them i need scrollbar functionality, but since it is my sidebar positioned at the left side I do not want scrollbars to appear. Note: Making parent div overflow:hiddent and child one to scroll doesn't help.
Cœur
  • 37,241
  • 25
  • 195
  • 267
yerassyl
  • 2,958
  • 6
  • 42
  • 68

2 Answers2

0

Try

overflow: hidden

on the parent, and then set

overflow-y: scroll

on the container. An example for you here: http://jsfiddle.net/DGmUK/

bitten
  • 2,463
  • 2
  • 25
  • 44
0

You can add a outer-bow that crops the scrollbars off.

.outer{
width:200px;
height:200px;
overflow:hidden;
}
.scrollbox{
width:260px;
height:200px;
overflow:scroll;
}
.inner{
width:190px;    
}

http://jsfiddle.net/johanthuresson/bj6wb0xo/1/

johanthuresson
  • 580
  • 3
  • 5