Full-Bleed Regions
Part of the Responsive UI Patterns section of Coddy's Tailwind CSS journey. Lesson 4 of 55.
A magazine page can use three grid tracks: equal flexible gutters around a center capped at 500px. At a 900px page width the gutters are 200px each. The article starts in the second column while a banner spans the whole explicit grid.
<main class="grid grid-cols-[1fr_minmax(0,500px)_1fr]">
<header class="col-span-full">Museum week</header>
<article class="col-start-2">Visitor guide</article>
</main>The pattern grid-cols-[1fr_minmax(0,500px)_1fr] keeps the reading region narrow on wide screens and lets it shrink on small screens. Use col-start-2 for reading content and col-span-full for full-width regions; neither needs fixed positioning or duplicated markup.
Challenge
MediumBuild a page with a full-width event banner and a centered reading region capped at 480px. Use three grid tracks with equal outer gutters and a center that can shrink to the viewport. Keep the banner spanning all tracks and the article in the center track.
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>
<main id="page" class="grid grid-cols-1"><header id="banner" class="">Open workshop week</header><article id="reading" class="">Choose a workshop from the guide.</article></main>
</body></html>
This lesson includes a short quiz. Start the lesson to answer it and track your progress.
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 Browser