I trying to draw a vertical line with multiple branches left and right sides of the line. I used pseudo
class div after but when right side text there is a problem in positioning the arrow.Is there any other way to write this class.Can anyone suggest me how to write this class?
Any help appreciated.
for inspiration look at this demo
.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: 14%;
padding: 15px 50px;
}
.text-right { text-align: right;}
.at-timeline .timeline--details:before {
content: "";
position: absolute;
width: 35px;
height: 2px;
top: 17%;
right: 0;
background: #2783e8;
}
.at-timeline:after {
content: "";
position: absolute;
width: 2px;
height: 300%;
top: 15%;
left: 24%;
background: #2783e8;
}
<div class="timeline at-timeline" style="padding: 100px;">
<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>