Cards

The cards share an image, heading, and short lesson on spacing. The inset image variant uses a shorter paragraph without topic metadata. Boxed cards use a 24px outer radius and a 16px image radius.

Vertical card

The card keeps its original max-width: 344px and shrinks with the available space. Its outer surface uses border-r-24, while the image keeps border-r-16.

Epic CSS with 11ty UI Library banner

Give content room to breathe

Design fundamentals · Spacing and rhythm

Consistent spacing helps readers see what belongs together. Leave more space between groups than between related elements. Explore spacing and layout

Show code
HTML
<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>

Inset image card

Give the image its own px-12 pt-12 wrapper: a 12px inset at the top and sides, with no bottom padding. The separate content wrapper uses p-24 for 24px padding. The image's 16px radius complements the card's 24px outer radius within the 12px inset. The content has one heading and one short paragraph with an inline link; no metadata row. Top content padding preserves 24px between the image and heading. The card caps at 344px and the image fills its available width while retaining its aspect ratio.

Epic CSS with 11ty UI Library banner

Give content room to breathe

Consistent spacing helps readers see what belongs together. Explore spacing and layout

Show code
HTML
<div class="clr-primary-bg border-r-24" style="max-width: 344px">
  <div class="px-12 pt-12">
    <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>
  <div class="p-24">
    <h3 class="clr-primary mt-0 mb-24"><a href="/docs/wrapper-and-container/">Give content room to breathe</a></h3>
    <p class="mb-0">Consistent spacing helps readers see what belongs together. <a href="/docs/wrapper-and-container/" class="clr-underline">Explore spacing and layout</a></p>
  </div>
</div>

Horizontal card, image left

Both horizontal variants give the image link wrapper mb-24 mb-lg-0: a 1.5rem bottom margin while stacked, reset to zero from 960 pixels when the horizontal gap takes over.

flex-lg places the image and content side by side from 960 pixels, with equal flex-1 halves and gap-24 between them. Below large, the image stacks above the text.

Epic CSS with 11ty UI Library banner

Give content room to breathe

Design fundamentals · Spacing and rhythm

Consistent spacing helps readers see what belongs together. Leave more space between groups than between related elements. Explore spacing and layout

Show code
HTML
<div class="clr-primary-bg p-24 border-r-24 flex-lg gap-24 items-start">
    <a href="/docs/wrapper-and-container/" class="flex flex-1 items-start mb-24 mb-lg-0"><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 class="flex-1">
        <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>

Horizontal card, image right

Put the image first in the HTML so it stacks above the text on smaller screens. Add order-lg-last to the image link wrapper: from 960 pixels, order: 1 moves it after the content, placing the image on the right when flex-lg makes the card horizontal.

Epic CSS with 11ty UI Library banner

Give content room to breathe

Design fundamentals · Spacing and rhythm

Consistent spacing helps readers see what belongs together. Leave more space between groups than between related elements. Explore spacing and layout

Show code
HTML
<div class="clr-primary-bg p-24 border-r-24 flex-lg gap-24 items-start">
    <a href="/docs/wrapper-and-container/" class="flex flex-1 items-start order-lg-last mb-24 mb-lg-0"><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 class="flex-1">
        <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>

Author profile for a sidebar

An unboxed profile capped at 344px, also usable in a 268px sidebar. The portrait sits beside a vertically centered name, role and social row; the biography spans the width below. Flex wrapping moves the text below the portrait when space becomes tight. The few inline dimensions keep the copied example self-contained without adding library utilities.

Alex Example

Theme contributor

Writes about practical page layouts, shared content and the small decisions that make interfaces easier to read.

Show code
HTML
<section aria-label="Demo author profile" style="max-width: 344px;">
  <div class="flex flex-wrap items-center gap-16 mb-16">
    <img src="/assets/author-placeholder.svg" alt="" width="96" height="96" class="mb-0" style="border-radius: 50%; flex-shrink: 0;">
    <div style="flex: 1 1 144px; min-width: 0;">
      <h3 class="fs-20 lh-24 m-0">Alex Example</h3>
      <p class="fs-14 lh-20 mt-4 mb-8">Theme contributor</p>
      <nav aria-label="Author social profiles and feed">
        <ul class="flex flex-wrap gap-4 list-none p-0 m-0">
        
          <li><a href="https://example.com/#x" aria-label="X profile (demo link)" class="flex items-center justify-center p-4" style="color: inherit;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false"><g transform="scale(1.5)"><path d="M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"/></g></svg></a></li>
        
          <li><a href="https://example.com/#linkedin" aria-label="LinkedIn profile (demo link)" class="flex items-center justify-center p-4" style="color: inherit;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false"><g transform="scale(1.5)"><path d="M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854zm4.943 12.248V6.169H2.542v7.225zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248S2.4 3.226 2.4 3.934c0 .694.521 1.248 1.327 1.248zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016l.016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225z"/></g></svg></a></li>
        
          <li><a href="https://example.com/#github" aria-label="GitHub profile (demo link)" class="flex items-center justify-center p-4" style="color: inherit;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false"><g transform="scale(1.5)"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27s1.36.09 2 .27c1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.01 8.01 0 0 0 16 8c0-4.42-3.58-8-8-8"/></g></svg></a></li>
        
          <li><a href="https://example.com/#rss" aria-label="RSS feed (demo link)" class="flex items-center justify-center p-4" style="color: inherit;"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false"><g transform="scale(1.5)"><path d="M14 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1zM2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2z"/>
  <path d="M5.5 12a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m-3-8.5a1 1 0 0 1 1-1c5.523 0 10 4.477 10 10a1 1 0 1 1-2 0 8 8 0 0 0-8-8 1 1 0 0 1-1-1m0 4a1 1 0 0 1 1-1 6 6 0 0 1 6 6 1 1 0 1 1-2 0 4 4 0 0 0-4-4 1 1 0 0 1-1-1"/></g></svg></a></li>
        
        </ul>
      </nav>
    </div>
  </div>
  <p class="mb-0">Writes about practical page layouts, shared content and the small decisions that make interfaces easier to read.</p>
</section>

Alex Example is a demo author. Links point to example.com; replace them with your own profile and feed URLs. Replace the neutral avatar with an image you can use. Its empty alt avoids repeating the adjacent name; write meaningful alt text if your replacement conveys additional information.

Social marks use inherited text color and labeled links. The displayed code omits license comments for readability; Copy HTML includes one consolidated Bootstrap Icons MIT notice for the complete card. Keep that notice when reusing it. Read the full notice or browse individual social/feed SVGs and brand guidance. Standalone Copy SVG includes each icon's notice.