Layouts
Featured lesson with a supporting grid
From 960 pixels, grid-lg-1fr-2fr gives the featured card one share of the width and the supporting group two shares, after the gap. Inside that group, grid-lg-1fr-1fr-1fr arranges six cards in three columns and two rows. The featured card stretches to the group's height through normal grid alignment. Below large, the feature stacks above the group; supporting cards use two columns from 820 pixels and one below that.
Give each idea a place
One featured lesson gives the section a starting point. Shorter supporting lessons share a steady grid beside it.
Give content room to breathe
Consistent spacing helps readers see what belongs together. Leave more space between groups than between related elements. Explore spacing and layout
Group related content
Keep related elements close so readers can see which ideas belong together.
Set a clear rhythm
Repeat a few spacing values to make movement between sections predictable.
Let type guide
Use heading size and line height to show where each new idea begins.
Share the space
Equal tracks give supporting ideas a consistent place without fixed card widths.
Keep a reading order
Stack the cards in source order when the available space becomes narrow.
Compose in layers
Build the larger regions first, then arrange the content within each region.
Show code
<section aria-labelledby="featured-grid-title">
<h2 id="featured-grid-title" class="fs-32 lh-37 mt-0 mb-16">Give each idea a place</h2>
<p class="mt-0 mb-32">One featured lesson gives the section a starting point. Shorter supporting lessons share a steady grid beside it.</p>
<div class="grid grid-lg-1fr-2fr gap-24">
<div class="clr-primary-bg p-24 border-r-24 flex flex-col justify-between gap-24">
<a href="/docs/wrapper-and-container/" class="flex"><img class="border-r-16 mb-0 w-100" src="/assets/blog/featured-image/design2seo-11ty-theme.webp" alt="Epic CSS with 11ty UI Library banner" width="484" height="242"></a>
<div><h3 class="clr-primary mt-0 mb-24">
<a href="/docs/wrapper-and-container/">Give content room to breathe</a>
</h3>
<div class="mb-24">
<span>Design fundamentals</span> · <span>Spacing and rhythm</span>
</div>
<p class="mb-0">
Consistent spacing helps readers see what belongs together. Leave more space between groups than between related elements.
<a href="/docs/wrapper-and-container/" class="clr-underline">Explore spacing and layout</a></p></div>
</div>
<div class="grid grid-md-1fr-1fr grid-lg-1fr-1fr-1fr gap-16">
<div class="clr-primary-bg p-16 border-r-24">
<h3 class="fs-20 lh-24 mt-0 mb-12"><a href="/docs/wrapper-and-container/">Group related content</a></h3>
<p class="fs-14 lh-20 m-0">Keep related elements close so readers can see which ideas belong together.</p>
</div>
<div class="clr-primary-bg p-16 border-r-24">
<h3 class="fs-20 lh-24 mt-0 mb-12"><a href="/docs/grid/#gap">Set a clear rhythm</a></h3>
<p class="fs-14 lh-20 m-0">Repeat a few spacing values to make movement between sections predictable.</p>
</div>
<div class="clr-primary-bg p-16 border-r-24">
<h3 class="fs-20 lh-24 mt-0 mb-12"><a href="/docs/typography/">Let type guide</a></h3>
<p class="fs-14 lh-20 m-0">Use heading size and line height to show where each new idea begins.</p>
</div>
<div class="clr-primary-bg p-16 border-r-24">
<h3 class="fs-20 lh-24 mt-0 mb-12"><a href="/docs/grid/">Share the space</a></h3>
<p class="fs-14 lh-20 m-0">Equal tracks give supporting ideas a consistent place without fixed card widths.</p>
</div>
<div class="clr-primary-bg p-16 border-r-24">
<h3 class="fs-20 lh-24 mt-0 mb-12"><a href="/docs/flexbox/">Keep a reading order</a></h3>
<p class="fs-14 lh-20 m-0">Stack the cards in source order when the available space becomes narrow.</p>
</div>
<div class="clr-primary-bg p-16 border-r-24">
<h3 class="fs-20 lh-24 mt-0 mb-12"><a href="/ui/layouts/">Compose in layers</a></h3>
<p class="fs-14 lh-20 m-0">Build the larger regions first, then arrange the content within each region.</p>
</div>
</div>
</div>
</section>
Three column
A section heading followed by three existing vertical cards. flex-md switches the parent to flex from 820 pixels, and flex-1 on each wrapper shares the available row width equally. Below medium the cards stack. gap-24 separates columns, and mb-24 separates stacked cards.
Make room for your next ideas
Give content room to breathe
Consistent spacing helps readers see what belongs together. Leave more space between groups than between related elements. Explore spacing and layout
Give content room to breathe
Consistent spacing helps readers see what belongs together. Leave more space between groups than between related elements. Explore spacing and layout
Give content room to breathe
Consistent spacing helps readers see what belongs together. Leave more space between groups than between related elements. Explore spacing and layout
Show code
<section aria-labelledby="three-column-title">
<h2 id="three-column-title" class="text-center fs-32 lh-37 mt-0 mb-32">Make room for your next ideas</h2>
<div class="flex-md gap-24">
<div class="flex-1 mb-24">
<div class="clr-primary-bg p-24 border-r-24" style="max-width: 344px">
<a href="/docs/wrapper-and-container/" class="flex mb-8"><img class="border-r-16 mb-0" src="/assets/blog/featured-image/design2seo-11ty-theme.webp" alt="Epic CSS with 11ty UI Library banner" width="484" height="242"></a>
<h3 class="clr-primary mt-0 mb-24">
<a href="/docs/wrapper-and-container/">Give content room to breathe</a>
</h3>
<div class="mb-24">
<span>Design fundamentals</span> · <span>Spacing and rhythm</span>
</div>
<p class="mb-0">
Consistent spacing helps readers see what belongs together. Leave more space between groups than between related elements.
<a href="/docs/wrapper-and-container/" class="clr-underline">Explore spacing and layout</a></p>
</div>
</div>
<div class="flex-1 mb-24">
<div class="clr-primary-bg p-24 border-r-24" style="max-width: 344px">
<a href="/docs/wrapper-and-container/" class="flex mb-8"><img class="border-r-16 mb-0" src="/assets/blog/featured-image/design2seo-11ty-theme.webp" alt="Epic CSS with 11ty UI Library banner" width="484" height="242"></a>
<h3 class="clr-primary mt-0 mb-24">
<a href="/docs/wrapper-and-container/">Give content room to breathe</a>
</h3>
<div class="mb-24">
<span>Design fundamentals</span> · <span>Spacing and rhythm</span>
</div>
<p class="mb-0">
Consistent spacing helps readers see what belongs together. Leave more space between groups than between related elements.
<a href="/docs/wrapper-and-container/" class="clr-underline">Explore spacing and layout</a></p>
</div>
</div>
<div class="flex-1 mb-24">
<div class="clr-primary-bg p-24 border-r-24" style="max-width: 344px">
<a href="/docs/wrapper-and-container/" class="flex mb-8"><img class="border-r-16 mb-0" src="/assets/blog/featured-image/design2seo-11ty-theme.webp" alt="Epic CSS with 11ty UI Library banner" width="484" height="242"></a>
<h3 class="clr-primary mt-0 mb-24">
<a href="/docs/wrapper-and-container/">Give content room to breathe</a>
</h3>
<div class="mb-24">
<span>Design fundamentals</span> · <span>Spacing and rhythm</span>
</div>
<p class="mb-0">
Consistent spacing helps readers see what belongs together. Leave more space between groups than between related elements.
<a href="/docs/wrapper-and-container/" class="clr-underline">Explore spacing and layout</a></p>
</div>
</div>
</div>
</section>
The cards share the spacing lesson and retain their 344-pixel maximum width.
Layout section headings use h2; the cards retain their h3 headings.