JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="item">Element 1</div>
<div class="item">Element 2</div>
<div class="item">Element 3</div>
</div>
CSS
.container {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}
.item {
flex: 1 1 auto;
margin: 10px;
background: lightgrey;
text-align: center;
padding: 20px;
}
@media (max-width: 700px) {
.item {
flex-basis: 50%;
}
.item:last-child {
flex-basis: 100%;
}
}