← All elements

Vertical Timeline

by @admin · 5 views

<ol class="pc-timeline">
  <li>
    <time>Oct 12</time>
    <h3>Order placed</h3>
    <p>Payment confirmed.</p>
  </li>
  <li>
    <time>Oct 13</time>
    <h3>Packed in Quezon City</h3>
    <p>Wrapped and labelled.</p>
  </li>
  <li>
    <time>Oct 14</time>
    <h3>Handed to courier</h3>
    <p>Tracking is now active.</p>
  </li>
  <li>
    <time>Oct 16</time>
    <h3>Out for delivery</h3>
    <p>Arriving today.</p>
  </li>
</ol>

About this layout

A vertical delivery timeline where each dot and connecting line comes from pseudo-elements on an ordered list.

How it works

An ordered list is the timeline. Each item draws its dot with ::before, a small bordered circle, and the connecting line with ::after, a 2px strip running down the item. The last item hides its line and gets a filled dot, so the line only joins steps and never trails off.

Ways to customise it

  • Change #4f35e8 to recolour the dots.
  • Change the padding-bottom of 20px to space the steps out.
  • Add more li items; the line and dots follow automatically.

Good to know

An ol keeps the order meaningful for screen readers, and the time element can carry a machine-readable datetime attribute if you add one. Nothing here depends on script or on hover.

Open an example, copy the HTML and the CSS, and paste them into your page. There is nothing to install and no JavaScript to load.

More in Layout

View all →