JSFiddle - React, Tailwind, and code Playground
by michaelreynolds
HTML
<div class="row">
<div class="one-of-three">one-of-three</div>
<div class="one-of-three">one-of-three</div>
<div class="one-of-three">one-of-three</div>
<div class="one-of-three">one-of-three</div>
<div class="one-of-three">one-of-three</div>
<div class="one-of-three">one-of-three</div>
<div class="clear">rogue div divider</div>
<!-- <div>blank div does the same thing</div> -->
<div class="one-of-three">one-of-three</div>
<div class="one-of-three">one-of-three</div>
<div class="one-of-three">one-of-three</div>
<div class="one-of-three">one-of-three</div>
<div class="one-of-three">one-of-three</div>
<div class="one-of-three">one-of-three</div>
</div>
CSS
*{
color: #fff;
}
.clear{
clear: both;
/* overflow acts the same as clear */
/* overflow: hidden; */
width: 100%;
background-color: blue;
}
div.row{
width: 700px;
background-color: #000;
overflow: hidden;
}
div.one-of-three{
width:200px;
float: left;
margin-right:50px;
background-color: #ff0000;
}
div.one-of-three:nth-of-type(3n+3){
margin-right: 0;
}