I have a ul list which is inside a bootstrap grid element:
<div class="row">
<div class="col-sm-8">
<div id="playlist-wrapper">
<ul id="playlist">
<li>
...
</li>
<li>
...
</li>
<li>
...
</li>
</ul>
</div>
</div>
</div>
If that bunch of li elements are bigger than the col-sm-8's width they will jump to the next line.
I want to add a horizontal scrollbar so all the li elements are in the same li only visible at col-sm-8's width with the possibility to scroll horizontally through them.
I tried setting a fixed height to the wrapper (so only one row can be seen) and adding overflow-y hidden and white-space nowrap but it's not working:
#playlist-wrapper{
height: 150px;
overflow-y: hidden;
overflow: auto;
Tried also with overflow-x: scroll;
white-space: nowrap;
}
Also tried:
#playlist-wrapper ul {
white-space: nowrap;
}
Rest of the css not affecting the overflow just to make it a horizontal list and some text/color properties.
ul#playlist {
list-style-type: none;
margin: 0;
padding: 0;
background-color: black;
}
ul#playlist li {
float: left;
margin-left: 10px;
margin-top: 20px;
}
ul#playlist li p {
text-align: center;
color: white;
font-weight: bold;
text-decoration: none;
}
With that css I am having a vertical scrollbar. Is it possible to have a horizontal scrollbar somehow?