Changez Khan Changez Khan - 1 year ago 59
CSS Question

"overflow-x: auto" not working as it should

I am trying with

overflow-x: auto
, but it is not working as it should. Where no scroll bar should be visible, it is showing horizontal scrollbar.

Vertical scrollbar(
) is working perfectly as desired, but horizontal scrollbar(
) is not working properly. Here is the JSFiddle link.

Answer Source

Here are some minor changes required in your classes to get it work as you expected.

    width: 100%;
    white-space: nowrap;
    display: inline-block;
    margin: 0 auto;
    list-style: disc inside;
    margin-left: 10px;
    float: left;
    color: white;
    display: list-item;
    width: 50%;
    color: white;
    padding-left: 5px;
    width: 50%;
    display: inline;


Check this Example fiddle