title: CSS - Vertical timeline, connected to dots
body: <p>This is my timeline code this far, I would like to end the last timeline-post element in a yellow line and then to the last blue dot.</p>
  
  <p>I have tried to add this class <strong>.timeline:last-child::after</strong> but this does obliviously not work!</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.iconspace {
    position: relative;
    width: 40px;
    height: 40px;
    text-align: center;
    margin: 0 auto;
    border-radius: 50%;
    background-color: #25b5f1;
    z-index: 7;
  }
  
  .iconspace i {
    font-size: 18px;
    color: #FFFFFF;
    line-height: 40px;
  }
  
  .timeline {
    position: relative;
  }
  
  .timeline:before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 49.8%;
    width: 3px;
    height: 100%;
    background-color: RED;
    z-index: -5;
  }
  
  .timeline-post {
    height: 100px;
    width: 200px;
    background-color: green;
    margin: 0 auto;
    margin-top: 20px;
  }
  
  .timeline:last-child::after {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 49.8%;
    width: 3px;
    height: 100%;
    background-color: YELLOW;
    z-index: -5;
  }
  
  .timeline:after {
      position: absolute;
      content: "";
      display: inline-block;
      width: 15px;
      height: 15px;
      line-height: 1;
      background-color: #25b5f1;
      margin-top: 50px;
   left: 49.8%;
      border-radius: 50%; 
   text-align: center;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h3 class="entry-title" style="text-align: center;"&gt;EDUCATION&lt;/h3&gt;&lt;span class="border"&gt;&lt;/span&gt;
  &lt;div class="timeline"&gt;
    &lt;div class="iconspace"&gt;&lt;i class="fa fa-graduation-cap"&gt;&lt;/i&gt;&lt;/div&gt;
  
    &lt;div class="timeline-post"&gt;
      Test 1
    &lt;/div&gt;
  
    &lt;div class="timeline-post"&gt;
      Test 2
    &lt;/div&gt;
  
    &lt;div class="timeline-post"&gt;
      Test 3
    &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>