JSFiddle - React, Tailwind, and code Playground
HTML
Without CLEAR
<div class="wrapper">
<div class="testbox"></div>
<div class="testbox"></div>
<div class="testbox">How to make this one other color?</div>
<div class="testbox"></div>
<div class="testbox"></div>
<div class="testbox">How to make this one other color?</div>
</div>
<div class="clear"></div>
With CLEAR
<div class="wrapper">
<div class="testbox"></div>
<div class="testbox"> How to make this one other color?</div>
<div class="clear"></div>
<div class="testbox"></div>
<div class="testbox"></div>
<div class="testbox">How to make this one other color?</div>
<div class="testbox"></div>
</div>
CSS
.wrapper {
width: 600px;
height: 250px;
background: #cccccc;
display: block;
}
.testbox {
width: 180px;
height: 65px;
margin: 5px;
background: #ff0000;
display: inline-block;
float: left;
}
.clear {
clear: both;
}
}