JSFiddle - React, Tailwind, and code Playground
by duarteleao
HTML
<div class="wrapper">
<div class="parent">
<div class="child"> Content </div>
<div class="child"> Content </div>
<div class="child"> Content </div>
<div class="child"> Content </div>
<div class="child"> Content </div>
</div>
</div>
CSS
.wrapper {
background-color: yellowgreen;
display: block;
padding: 10px;
overflow-x:auto;
max-width: 180px;
}
.parent {
display: inline-flex; /* -- only change --*/
flex-flow: row nowrap;
justify-content: end;
background-color: yellow;
width:100%;
}
.child {
background-color: orange;
margin: 10px;
min-width: 50px;
}