Scrollbar not working

18,376

Solution 1

The problem is that you specified:

height:auto;

under the .my1 rule, so the div will expand in height as much as needed to accommodate the content.

If you had fixed the height, you would activate the scroll bar.

See demo at: http://jsfiddle.net/audetwebdesign/myPZB/

As far as trying to style the color of the scroll bar, the property of interest is:

scrollbar-face-color

and I think this is only supported on IE browsers at this time.

Reference: http://msdn.microsoft.com/en-us/library/ie/ms531157%28v=vs.85%29.aspx

Solution 2

height:50%

try this..I tested ok..if 'auto' , scroll is not work

Share:
18,376
Saumil
Author by

Saumil

Taking baby steps into this amazing tech world !!!!!!!

Updated on June 04, 2022

Comments

  • Saumil
    Saumil almost 2 years

    Below is my html file,

    <div class="col-xs-6 col-sm-3 my1" id="qwer1" role="navigation">        <!--Change is made here-->
              <div class="menuBar">
                <ul class="menuList" id="menuList">
                  <li><a href="#">Update 1</a></li>
                  <li><a href="#">Update 1</a></li>
                  <li><a href="#">Update 1</a></li>
                  <li><a href="#">Update 1</a></li>
                  <li><a href="#">Update 1</a></li>
                  <li><a href="#">Update 1</a></li>
                  <li><a href="#">Update 1</a></li>
                  <hr>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                  <li><a href="#">Chat 1</a></li>
                </ul>
              </div><!--/.well -->
            </div><!--/span-->
    

    Below is the css file,

    .my1
    {
        position:fixed;
        left:78%;
        border-left:1px solid black;
        border-bottom:1px solid black;
        width:20%;
        top:14%;
        height:auto;
        overflow:scroll;
        scroll-face-color:red;
    }
    

    The content of the html file is well out of the sreen, but eventhough the scrollbar is not operable. Moreover, I have specified the color of the scrollbar as red but the color effect also doesnt seem to be working. Below is the screenshot of browser,

    enter image description here

    How can I activte this scrollbar? Thanks in advance.