I have a scrolling div contain a ul in react.
When the number of liincreased, the division should scroll horizontally.
this is my code:
<div className="inner-scrolling">
<ul className="list">
<li> item</li>
...
</ul>
</div>
this is css:
.inner-scrolling {
width: 100%;
max-width: 0;
overflow-x: auto;
}
.list {
list-style: none;
display: inline-flex;
}
This is working correctly in Chrome but not working in Firefox. How can I fix it?
I tried max-width:500px but it doesn't work in Firefox yet. actually in Firefox, lis move out of the div.