-1

how can I hide the scroll bar if content height of the div doesn't reach its maximum height like for the example below: 400px and then shows up when the contents reaches or exceeds the height. Thanks!

So far, what I've done is here:

 <div class = "divmenu" style = "height: 400px;overflow-y: scroll;overflow-x:hidden">
     <div class = "col-lg-12">
       Content1 <br>
       Content2 <br>
       Content3 <br>
     </div>
 </div>
Ormocanon
  • 41
  • 5

1 Answers1

1

Simply change it to overflow: auto - like this:

<div class = "divmenu" style = "height: 400px; overflow: auto;overflow-x:hidden">
     <div class = "col-lg-12">
       Content1 <br>
       Content2 <br>
       Content3 <br>
     </div>
 </div>

overflow-x: hidden can stay if you need it to

StudioTime
  • 22,603
  • 38
  • 120
  • 207