Recap: Content Cards
Part of the Responsive UI Patterns section of Coddy's Tailwind CSS journey. Lesson 15 of 55.
Challenge
HardBuild a responsive spotlight card capped at 720px. Stack its illustration and copy below 768px; use a 240px illustration track, a 24px gap and a flexible copy track at wider sizes. Keep the supplied illustration square. Inside the supplied 240px-high copy region, use vertical flex layout and place the 32px Learn more link at the bottom with automatic top space. Preserve its heading and 64px description.
Preserve the supplied content, semantic elements and IDs. Edit the requested utility classes. Press Run preview after edits, then Check/Run code to grade the result. Supplied JavaScript is read-only.
Try it yourself
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Interface workshop</title><link rel="stylesheet" href="./styles.css"></head><body>
<article id="card" class="w-full max-w-[720px] grid grid-cols-1"><div id="media" class="aspect-square bg-slate-200">Illustration</div><section id="copy" class="h-60 block"><h2>Autumn studios</h2><p class="h-16">Meet local makers.</p><a id="action" href="#studios" class="h-8 block">Learn more</a></section></article>
</body></html>
All lessons in Responsive UI Patterns
1Page Shells
Growing Page ShellsFlexible Content RailsBounded Scroll RegionsFull-Bleed RegionsRecap: Page Shells4Form Layouts
Responsive Field GroupsFocused Field GroupsSelectable Form OptionsNative Validation CuesRecap: Form Layouts2Navigation Patterns
Wrapping NavigationCurrent Page CuesNative Menu DisclosuresKeyboard Skip LinksRecap: Navigation5Data Tables
Scrollable Data TablesPredictable Table ColumnsRow State PresentationSticky Table HeadersRecap: Data Tables8Interactive Panels
Expanded Control CuesChoice Card StatesFocus-Aware Help PanelsContent-Aware Empty StatesRecap: Interactive Panels11Project: Event Portal
Portal ShellSession Browser3Content Cards
Aligned Card ActionsCard Media FramesResponsive Feature CardsShared Card RowsRecap: Content Cards