JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="box red left"></div>
<div class="box yellow right"></div>
</div>
CSS
@media only screen and (max-width:400px){
.red {
background: red;
}
.yellow {
background: yellow;
}
.box{
width: 100px;
height: 100px;
}
.left{ float: left;}
.right{float: right;}
}
.container{
background: #ccc;
width: 90%;
height: 300px;
}