I am encountering an issue with my Bootstrap navigation menu that uses a flex container (). The goal is to have horizontal scrolling for the menu items when they surpass the width of the container. I have implemented the following CSS style on the container:
.nav {
display: flex;
flex-wrap: wrap;
overflow-x: auto;
width: 100%;
}
Despite applying this style, the expected horizontal scroll behavior is not functioning properly. Instead of providing a horizontal scroll, the menu items are still wrapping onto the next line.
Below is the HTML code for my navigation menu:
<ul class="nav nav-pills tab-listing" id="pills-tab" role="tablist">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4<li>
</ul>