JSFiddle - React, Tailwind, and code Playground

by abhishek_soni

HTML

<div class="timeline">
  <div class="container right">
    <div class="content">
      <p>2017</p>
      </div>
  </div>
   <div class="container right">
    <div class="content">
      <p>2016</p>
    </div>
  </div>
  <div class="container right">
    <div class="content">
      <p>This is the text that will come here and I am testing it to make it long enough.</p>
    </div>
  </div> 
 <!--  <div class="container right">
    <div class="content">
      <h2>2016</h2>
      <p>Lorem ipsum..</p>
    </div>
  </div>
  <div class="container right">
    <div class="content">
      <h2>2015</h2>
      <p>Lorem ipsum..</p>
    </div>
  </div> -->
</div>

CSS

{
box-sizing: border-box;
}

/* Set a background color */
body {
background-color: #474e5d;
font-family: Helvetica, sans-serif;
}

p{
  padding: 0px;
}

/* The actual timeline (the vertical ruler) */
.timeline {
position: relative;
max-width: 1200px;
margin: 0;
}

/* The actual timeline (the vertical ruler) */
.timeline::before {
content: '';
/* height: 40px; */
position: absolute;
width: 1px;
background-color: white;
top: 0;
bottom: 0;
left: 10px;
margin-left: 0px;
}

/* Container around content */
.container {
padding: 0px 0px 0px 40px;
position: relative;
background-color: inherit;
width: 50%;
}

/* The circles on the timeline */
.container::after {
content: '';
position: absolute;
width: 10px;
height: 10px;
right: 0px;
background-color: white;
border: 2px solid #FF9F55;  /* orange border */
top: 0px;
border-radius: 50%;
z-index: 1;
/* padding-bottom: 0px; */
}

/* Place the container to the left */
.left {
left: 0;
}

/* Place the container to the right */
.right {
/* left: 50%; */
left: 10px;
}

/* Add arrows to the left container (pointing right) */
/* .left::before {
content: " ";
height: 0;
position: absolute;
top: 22px;
width: 0;
z-index: 1;
right: 30px;
border: medium solid white;
border-width: 10px 0 10px 10px;
border-color: transparent transparent transparent white;
}
 */
 
/* Add arrows to the right container (pointing left) */

/* .right::before {
content: " ";
height: 0;
position: absolute;
top: 10px;
width: 0;
z-index: 1;
left: 30px;
border: medium solid white;
border-width: 10px 10px 10px 0;
border-color: transparent white transparent transparent;
} */

/* Fix the circle for containers on the right side */
.right::after {
/* left: -16px;
 */
 left: -6px;
 }

/* The actual content */
.content {
/* padding: 20px 30px;
 */
background-color: none;
position: relative;
/* border-radius: 6px;
 */
 }