JSFiddle - React, Tailwind, and code Playground
by ryanwheale
HTML
<div class="w-wrapper">
<div class="callout">1</div>
<div class="callout">3</div>
<div class="callout">5</div>
<div class="callout">2</div>
<div class="callout">4</div>
</div>
<div class="center-line"></div>
CSS
.callout:after,
.center-line {
position: absolute;
top: 0;
bottom: 0;
left: 50%;
width: 1px;
margin-left: -.5px;
background-color: red;
}
.w-wrapper {
text-align: center;
}
.callout {
color: #eee;
position: relative;
display: inline-block;
vertical-align: top;
width: 20%;
/* Play with the 5.1% values to fine tune the centering */
margin: 2em 5% 2em 5%;
border: 1px solid black;
}
.callout:after {
content: " ";
background-color: blue;
}