Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How Can I scroll through a div without the scrollbars showing?

Tags:

css

I have the following css but the scroll bars are visible. how can I make them invisible (scrollable div without scrollbars)?

.myDiv
{
    height:300px;
    overflow: scroll;

}
like image 775
code511788465541441 Avatar asked May 03 '11 15:05

code511788465541441


1 Answers

.myDiv {
  width: 200px;
  height:300px;
  overflow: scroll;
}

.wrapper {
  width: 183px;
  height: 283px;
  overflow: hidden;
  border: 1px solid black;
}


<div class="wrapper">
  <div class="myDiv">
    floating div content...
  </div>
</div>

This might work - basically you're placing a smaller div around the one you want and hiding the scroll bars.

like image 82
Nick Brunt Avatar answered Oct 11 '22 13:10

Nick Brunt