I am trying to create a list using ul li elements. When the content inside the li exceeds the width, a scrollbar appears. However, I am encountering an issue where the li tag does not cover the entire width and spills outside.
.container{
background: blue;
padding:20px;
width:220px;
}
ul{
list-style: none;
padding: 0;
margin: 0;
overflow-x:auto;
}
ul li{
background: white;
margin-bottom:10px;
min-width:100%;
}
<div class="container">
<ul>
<li>New york</li>
<li>Sierra Leone</li>
<li>Neque porro quisquam est qui dolorem ipsum quia dolor sit amet hhoihoihoihoihihihoihoihoihoihoihoihoihoihfhgfdhgddhgd</li>
</ul>
</div>