Itinerary Card

Display a chronological schedule of events or activities with this clean and modern itinerary timeline card.

This component is perfect for travel websites, event agendas, or any application that needs to present a sequence of events. The design uses CSS pseudo-elements to create a visual timeline connecting each item.

Screenshot of an itinerary card with a vertical timeline connecting several scheduled events.

Get Source Code Preview

About this Component

This template uses a semantic ordered list to present the itinerary. The timeline effect (the vertical line and the circular "dots" for each event) is created purely with CSS pseudo-elements, making this a lightweight and reliable component. The text content is pushed to the right with padding, creating space for the timeline graphics.

Features

Code Breakdown

HTML Structure

The card is built as a section. After a header for the title (e.g., "Day 1"), the timeline itself is a semantic ordered list (ol). Each event in the timeline is a list item (li) that contains the event's time, title, and description.

CSS Styling

This timeline is built on a simple foundation:

  1. The parent ol (.itinerary-timeline) has position: relative and is given a generous padding-left to create empty space for the timeline visuals.
  2. A ::before pseudo-element is added to this ol to create the single, continuous vertical line. It is absolutely positioned to sit inside the empty padding area.
  3. Each li element (.itinerary-item) is also given position: relative.
  4. Finally, a ::before pseudo-element is added to each li. This pseudo-element is styled as a circular dot and positioned absolutely with a negative left value, which places it perfectly on top of the vertical line. This technique ensures perfect alignment without complex grid or flex calculations.

Code

Here's the complete, self-contained code. You can easily build out a schedule by adding more li elements to the ordered list.

View Output