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; } /* === Grid Container for the Cards === */ .cards-grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; padding: 1.5rem; } /* === Event Card Styles === */ .event-card { --event-card-radius: 12px; --event-card-shadow: 0 4px 10px rgba(0,0,0,0.06); background-color: #ffffff; border-radius: var(--event-card-radius); box-shadow: var(--event-card-shadow); display: flex; flex-direction: column; overflow: hidden; transition: box-shadow 0.2s ease, transform 0.2s ease; } .event-card:hover { transform: translateY(-5px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); } .event-card-banner { background-color: #4f46e5; height: 10px; } .event-card.style-2 .event-card-banner { background-color: #16a34a; } .event-card.style-3 .event-card-banner { background-color: #f59e0b; } .event-card-content { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; } .event-card-title-link { text-decoration: none; color: inherit; } .event-card-title-link:hover .event-card-title { color: #4f46e5; } .event-card-title { font-size: 1.375rem; font-weight: 700; line-height: 1.3; margin: 0; transition: color 0.2s ease; } /* Info list for date/location */ .event-card-info-list { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: 0.75rem; flex-grow: 1; } .event-card-info-item { display: flex; align-items: center; gap: 0.75rem; font-size: 1rem; color: #374151; } .event-card-info-item svg { width: 20px; height: 20px; color: #9ca3af; flex-shrink: 0; } /* Footer section */ .event-card-footer { display: flex; justify-content: flex-end; margin-top: 1.5rem; } .event-card-cta { background-color: #4f46e5; color: #ffffff; font-weight: 500; font-size: 0.95rem; padding: 0.6rem 1.25rem; border-radius: 8px; text-decoration: none; transition: background-color 0.2s ease; } .event-card-cta:hover { background-color: #4338ca; } </style> <!-- Place the following HTML in your <body> --> <div class="cards-grid-container"> <!-- Card 1 --> <article class="event-card"> <div class="event-card-banner"></div> <div class="event-card-content"> <a href="#" class="event-card-title-link"> <h3 class="event-card-title">Annual Tech Conference 2024</h3> </a> <ul class="event-card-info-list"> <li class="event-card-info-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M5.75 2a.75.75 0 01.75.75V4h7V2.75a.75.75 0 011.5 0V4h.25A2.75 2.75 0 0118 6.75v8.5A2.75 2.75 0 0115.25 18H4.75A2.75 2.75 0 012 15.25v-8.5A2.75 2.75 0 014.75 4H5V2.75A.75.75 0 015.75 2zM4.5 6.5A1.25 1.25 0 003.25 7.75v7.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-7.5A1.25 1.25 0 0015.25 6.5H4.5z" clip-rule="evenodd"/></svg> <time datetime="2024-09-15">September 15-17, 2025</time> </li> <li class="event-card-info-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M9.965 2.093a1 1 0 01.07 0c3.23.284 5.922 3.012 5.922 6.264 0 3.639-2.924 7.647-5.513 10.975a1 1 0 01-1.488 0C6.353 15.998 3.5 12.012 3.5 8.357c0-3.252 2.692-5.98 5.922-6.264a1 1 0 01.543 0zM10 11a2.5 2.5 0 100-5 2.5 2.5 0 000 5z" clip-rule="evenodd" /></svg> <span>Grand Metro Convention Center</span> </li> </ul> <div class="event-card-footer"> <a href="#" class="event-card-cta">View Details</a> </div> </div> </article> <!-- Card 2 --> <article class="event-card style-2"> <div class="event-card-banner"></div> <div class="event-card-content"> <a href="#" class="event-card-title-link"> <h3 class="event-card-title">Quarterly Community Meetup</h3> </a> <ul class="event-card-info-list"> <li class="event-card-info-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M5.75 2a.75.75 0 01.75.75V4h7V2.75a.75.75 0 011.5 0V4h.25A2.75 2.75 0 0118 6.75v8.5A2.75 2.75 0 0115.25 18H4.75A2.75 2.75 0 012 15.25v-8.5A2.75 2.75 0 014.75 4H5V2.75A.75.75 0 015.75 2zM4.5 6.5A1.25 1.25 0 003.25 7.75v7.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-7.5A1.25 1.25 0 0015.25 6.5H4.5z" clip-rule="evenodd"/></svg> <time datetime="2024-11-22">November 22, 2025</time> </li> <li class="event-card-info-item"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M9.965 2.093a1 1 0 01.07 0c3.23.284 5.922 3.012 5.922 6.264 0 3.639-2.924 7.647-5.513 10.975a1 1 0 01-1.488 0C6.353 15.998 3.5 12.012 3.5 8.357c0-3.252 2.692-5.98 5.922-6.264a1 1 0 01.543 0zM10 11a2.5 2.5 0 100-5 2.5 2.5 0 000 5z" clip-rule="evenodd" /></svg> <span>The Community Hub</span> </li> </ul> <div class="event-card-footer"> <a href="#" class="event-card-cta">RSVP Now</a> </div> </div> </article> </div>