<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;
*/
}
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.