JSFiddle - React, Tailwind, and code Playground
by Daedalus
HTML
<div style="position: relative;">
<div style="position: relative;">
<div class="container">
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<div class="box"></div>
<span class="stretch"></span>
</div>
</div>
</div>
CSS
.container {
border: 2px dashed #444;
height: 125px;
text-align: justify;
-ms-text-justify: distribute-all-lines;
text-justify: distribute-all-lines;
/* just for demo */
width: 612px;
position: absolute;
}
.box {
vertical-align: top;
display: inline-block;
width: 10px;
height: 98%;
background-color: black;
}
.stretch {
width: 100%;
display: inline-block;
font-size: 0;
line-height: 0
}
.box:nth-child(even) {
background: #ccc
}
.box:nth-child(odd):not(.stretch) {
background: #0ff
}