I have a layout using bootstrap. On a mobile device, I would like each of my rows to be positioned as points on my timeline so that I have an end result like this:
For my desktop layout I use two tags as shown below and just position text around those line. However, for the mobile layout, it would be great if the row with the text in it also contained the point on the timeline, so those were always lined up correctly, no matter how many lines the text wraps onto.
<div class="middle-line-top"></div>
<div class="middle-line"></div>
css:
.middle-line {
position: fixed;
height: 79vh;
bottom: 0;
width: 1px;
left: 50%;
background-color: white;
z-index: -1;
}
.middle-line:before {
border: 5px solid white;
width: 18px;
height: 18px;
display: block;
content: '';
bottom: 100%;
-webkit-transform: translateX(-51%);
transform: translateX(-51%);
position: absolute;
box-sizing: border-box;
border-radius: 50%;
z-index: -1;
}
.middle-line-top {
position: fixed;
height: 3vh;
top: 0vh;
width: 1px;
left: 50%;
background-color: white;
}
.middle-line-top:after {
border: 5px solid white;
width: 18px;
height: 18px;
display: block;
content: '';
-webkit-transform: translateX(-51%);
transform: translateX(-51%);
position: absolute;
bottom: -18px;
box-sizing: border-box;
border-radius: 50%;
}