Create a clean, modern timeline using html and css

Whether you want to show a purchasing process, the highlights of your career on your portfolio, or anything else, learn how to create a sleek, modern timeline to show it off!
•
Updated on August 14, 2026
•
2 min read
Believemy logo

Whether you're out of inspiration or trying to recreate a website like Twitter, this article will help you reproduce a profile highly inspired by those offered by Twitter.

You can find the entire tutorial on our Instagram account.

 

Step 1

Let's start by creating the HTML structure of our timeline.

HTML
<div class="timeline">
        <div class="timeline-object complete">
          <div class="timeline-status"></div>
          <div class="timeline-content">
            <h3>Start of Training</h3>
            <span>19.06.2020</span>
          </div>
        </div>
        
        <div class="timeline-object complete">
          <div class="timeline-status"></div>
          <div class="timeline-content">
            <h3>Final Project</h3>
            <span>05.07.2020</span>
          </div>
        </div>
        
        <div class="timeline-object">
          <div class="timeline-status"></div>
          <div class="timeline-content">
            <h3>Diploma Awarding</h3>
            <span>17.09.2020</span>
          </div>
        </div>
      </div>

Each timeline element has its own timeline-object.

 

Step 2

Let's avoid padding issues.

CSS
* {
      box-sizing: border-box;
    }

This little trick allows us to specify that all elements on the site (*) should include their padding in their size.

 

Step 3

Now let's style each timeline object.

CSS
.timeline-object {
      display: flex;
      align-items: center;
      margin-top: 50px;
      position: relative;
    }

Nothing very special to add: we use flexbox to center the elements together.

 

Step 4

Now let's tackle the display of objects when they are completed.

CSS
.timeline-object.complete::after {
      content: '';
      display: block;
      position: absolute;
      
      width: 4px;
      height: 100px;
      background-color: #1DBF73;
      
      left: 23px;
      top: 50px;
      transform: translateX(-50%);
    }

 

Step 5

Let's handle the status of the elements.

CSS
.timeline-status {
      height: 46px;
      width: 46px;
      border-radius: 50%;
      background-color: #1DBF73;
    }

Each element will be represented by a small circular icon.

 

Step 6

Now we need to handle the status of the incomplete elements.

CSS
.timeline-object:not(.complete) .timeline-status {
      background: #ffffff;
      border: 4px solid #C5C5C5;
    }

Incomplete elements are now represented by a circle with gray borders.

 

Step 7

Now let's style the content of each object: the title and the span tag.

CSS
.timeline-content {
      margin-left: 15px;
    }
    
    .timeline-content h3 {
      color: #1DBF73;
      background: #CFF6CF;
      padding: 5px 10px;
      border-radius: 5px;
      margin-bottom: 10px;
    }
    
    .timeline-content span {
      color: #103B27;
      font-size: .9em;
      font-weight: bold;
    }

 

Step 8

Now we just need to handle the case of an incomplete title to finish our timeline.

CSS
.timeline-object:not(.complete) .timeline-content h3 {
      color: #8A8A8A;
      background: #E1E1DF;
    }

Incomplete elements finally have a gray title.

Category: Developers

Share this article

Want to help us? Share this article on your networks or even better: on your site, in an article or in your newsletter.

Believemy logo
Comments (0)

You need to be logged in to comment on this article: log in or sign up.

Read next

Playing with blurs and filters on presentation cards with CSS

Looking for a way to display your latest blog posts or projects in a modern, animated way? These cards will go perfectly with your website! Let's find out how to make them.

December 9, 2024

Create a menu that spans the entire page using CSS

From time to time we have to ask our visitors which page they want to go to, by displaying the main sections of our website. This menu is often not very pleasant to use, so let's find out together in this article how to make it much more modern, with beautiful animations that will make your passers-by want to visit your site!

December 9, 2024

Create a very modern hover on a link

Here's an easy way to create a very modern hover on a link! There are lots of possible effects for buttons and links: the better they look, the more likely your users will be to click on them.

December 9, 2024

Create a map displaying links on mouse-over with CSS

To present your team or simply yourself, this animation will allow you to display the links to your social networks when you hover over the map: a striking effect guaranteed! Let's find out how to do it together.

December 9, 2024

Create an animated gradient background on hover avec CSS

Whether it's to highlight a part of your website or a quote as in this example, generating and adding a gradient to the background can give your website a very modern touch. Find out in this article how to do it easily!

December 9, 2024

Creating a NEON button with CSS

Creating a button is one thing! But creating a button that your visitors want to click is something else entirely. In any case, this neon button will catch the eye of everyone who visits your pages.

December 9, 2024

Creating an animated list with CSS

Let's find out how to create an animated hover list!

December 9, 2024

Creating text with integrated background

If you're looking for a very modern and effective way to style your headlines, take a look at how using a background to style the colour of your text can be incredibly innovative.

December 9, 2024

Become the solopreneur you dream of being.

First project, career change, business launch: access our courses, practice on real-world cases, and move forward with clear guidance.