Toggle navigation
☰
Home
HTML
CSS
Scripting
Database
<!DOCTYPE html> <title>My Example</title> <!-- Place the following CSS in your <head> or stylesheet --> <style> /* This is an optional body style to provide a background for the page */ body { background-color: #f3f4f6; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif; } /* Optional: a container to center the card on the page for demonstration */ .demo-container-itinerary { display: flex; justify-content: center; padding: 2rem; } /* === Itinerary Card Styles === */ .itinerary-card { --itinerary-radius: 12px; --itinerary-shadow: 0 4px 10px rgba(0,0,0,0.06); --timeline-color: #e5e7eb; /* A light gray */ --dot-color: #4f46e5; /* Indigo */ background-color: #ffffff; border-radius: var(--itinerary-radius); box-shadow: var(--itinerary-shadow); max-width: 500px; width: 100%; } .itinerary-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid #e5e7eb; } .itinerary-day { font-size: 1.25rem; font-weight: 600; margin: 0; } /* The main timeline container */ .itinerary-timeline { list-style: none; margin: 0; padding: 1.5rem 1.5rem 1.5rem 3.5rem; /* Left padding creates space for the timeline */ position: relative; /* Positioning context for the line */ } /* The vertical line */ .itinerary-timeline::before { content: ''; position: absolute; top: 1.5rem; bottom: 1.5rem; left: 32px; /* Position line within the padding */ width: 2px; background-color: var(--timeline-color); } .itinerary-item { position: relative; /* Positioning context for the dot */ } .itinerary-item:not(:last-child) { margin-bottom: 2rem; } /* The dot on the timeline */ .itinerary-item::before { content: ''; position: absolute; left: -32px; /* (Left padding) - (half dot width) - (border) */ top: 0px; /* Vertically align with text */ height: 14px; width: 14px; background: #fff; border: 3px solid var(--dot-color); border-radius: 50%; z-index: 1; /* Sits above the line */ } .itinerary-time { display: block; font-weight: 500; font-size: 0.9rem; color: #6b7280; margin-bottom: 0.25rem; } .itinerary-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 0.35rem; } .itinerary-location { font-size: 0.95rem; color: #4b5563; margin: 0; line-height: 1.5; } </style> <!-- Place the following HTML in your <body> --> <div class="demo-container-itinerary"> <section class="itinerary-card"> <header class="itinerary-header"> <h3 class="itinerary-day">Day 1: Arrival & Exploration</h3> </header> <ol class="itinerary-timeline"> <li class="itinerary-item"> <time datetime="2025-09-15T09:00" class="itinerary-time">9:00 AM</time> <h4 class="itinerary-title">Breakfast at Cafe Funes</h4> <p class="itinerary-location">Enjoy artisanal coffee and pastries to start the day.</p> </li> <li class="itinerary-item"> <time datetime="2025-09-15T10:30" class="itinerary-time">10:30 AM</time> <h4 class="itinerary-title">Kyoto National Museum</h4> <p class="itinerary-location">Explore the rich history and cultural artifacts.</p> </li> <li class="itinerary-item"> <time datetime="2025-09-15T13:00" class="itinerary-time">1:00 PM</time> <h4 class="itinerary-title">Lunch in Gion District</h4> <p class="itinerary-location">Traditional lunch at a local restaurant.</p> </li> <li class="itinerary-item"> <time datetime="2025-09-15T19:00" class="itinerary-time">7:00 PM</time> <h4 class="itinerary-title">Dinner at Kichi Kichi Omurice</h4> <p class="itinerary-location">Experience the famous viral omurice dish.</p> </li> </ol> </section> </div>