I kept all your HTML intact, I just deleted the inline style and changed it to margin to make the layout easier.
On the other hand, I tried not to use absolute units, except when trying to adapt to other units already installed.
The h4 fields match the default Chrome stylesheet. I just made it explicit to make it more portable in other browsers.
.at-timeline .timeline--details { position: relative; } .at-timeline .timeline--single { display: flex; flex-direction: row; } .at-timeline .timeline--details, .at-timeline .time--date { flex-basis: 50%; padding: 15px 50px; position: relative; } .at-timeline h4 { margin-top: 1.33em; } .text-right { text-align: right; } .at-timeline .timeline--details:before { content: ""; position: absolute; width: 35px; height: 2px; top: calc(15px + 1.83em); right: 0; background: #2783e8; } .at-timeline .reverse:before { content: ""; position: absolute; width: 35px; height: 2px; top: calc(15px + 1.83em); left: 0; background: #2783e8; } .at-timeline { position: relative; margin: 100px 100px; } .at-timeline:after { content: ""; position: absolute; width: 2px; left: 0px; right: 0px; margin: auto; top: 0px; bottom: 0px; background: #2783e8; }
<div class="timeline at-timeline"> <div class="timeline--single"> <div class="timeline--details text-right"> <h4 class="timeline--title">Title</h4> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum non dolor ultricies, porttitor justo non, pretium mi.</p> </div> <span class="time--date"> <span class="date">01</span> <span class="month">January</span> <span class="year">2017</span> </span> </div> <div class="timeline--single"> <span class="time--date text-right"> <span class="date">01</span> <span class="month">January</span> <span class="year">2017</span> </span> <div class="timeline--details reverse"> <h4 class="timeline--title">Title</h4> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum non dolor ultricies, porttitor justo non, pretium mi.</p> </div> </div> <div class="timeline--single"> <div class="timeline--details text-right"> <h4 class="timeline--title">Title</h4> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum non dolor ultricies, porttitor justo non, pretium mi.</p> </div> <span class="time--date"> <span class="date">01</span> <span class="month">January</span> <span class="year">2017</span> </span> </div> </div>
source share