overflow-y:scroll is not working for chrome

23,252

Solution 1

Add height property to your css class, to display scrollbar you need to set fix height of your div.

Solution 2

Are you by chance using a track pad instead of a mouse, on OSX? There's some quirk where the scrollbar will be hidden if you're using a track pad. Plug in a mouse and see if it appears.

Share:
23,252
AKG
Author by

AKG

Updated on July 31, 2022

Comments

  • AKG
    AKG over 1 year

    I am not getting a scroll-bar for box in chrome but getting in fire fox and internet explorer

    li.box{
        border-radius: 0px;
        padding:0;
        border: solid 1px #8c8d8e;
        overflow: hidden;
        overflow-y:scroll;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        background-color: #ffffff;
        opacity: 0.85;
    }
    

    this is JSFiddle link http://jsfiddle.net/wydsf2vk/

  • Woodrow Barlow
    Woodrow Barlow over 9 years
    @AKG I am using Chrome Version 37.0.2062.94 (64-bit) for RPM-based Linux, and both your fiddle (wydsf2vk) and Anshuman's display a scroll bar in my browser.
  • Woodrow Barlow
    Woodrow Barlow over 9 years
    @AKG note, however, that in yours, the scrollbar is non-functional -- since you did not specify a height, the div automatically expands to fill the contents and will never overflow.