I am trying to build a timeline to display a series of events, between each event is a margin which I cannot work out where it has come from, for visual purposes I have the code here: http://codepen.io/tomevans1664/pen/obvWyW
HTML:
<div class="center">
<div class="timeline-wrapper">
<div class="event">
<div class="event-date"></div>
<div class="event-marker"></div>
<h3 class="event-title">Experiment Created</h3>
<p class="event-description"></p>
<img class="event-img" alt="" src="">
</div>
<div class="event">
<div class="event-date"></div>
<div class="event-marker"></div>
<h3 class="event-title">Experiment Updated</h3>
<p class="event-description"></p>
<img class="event-img" alt="" src="">
</div>
</div>
</div>
CSS:
body{
margin: 0;
padding: 0;
}
.center{
margin-left: auto;
margin-right: auto;
width: 800px;
height: 500px;
border: 1px solid #dddddd;
}
.timeline-wrapper{
position: absolute;
height: inherit;
width: inherit;
}
.timeline-wrapper::before {
/* this is the vertical line */
content: '';
position: absolute;
top: 0;
left: 50%;
height: 100%;
width: 5px;
background: #d7e4ed;
}
.event {
width: 100%;
height: 100px;
background-color: #e8e8e8;
}
.center{width:100%}
do this.i think it will be solved