Skip to content
Codewilds

Lesson 29 of 29 · Polish & Interaction

Boss: Build a Responsive Landing Page with HTML & CSS

Boss battlehard100 XP2 min read

The Grand Gallery Guardian blocks the way. Every test you pass deals damage — pass them all to defeat it and claim a loot chest.

At the very top of the Painted Cliffs stands the Grand Gallery, the finest page in the realm, and its doors are watched by the Grand Gallery Guardian. It lets only one kind of visitor in: a builder who can raise a complete, polished web page from bare HTML. Everything you've learned in this course leads to this door.

Battle plan

This final fight combines the whole course:

  • CSS variables on :root keep the colours and the corner radius in one place.
  • Flexbox lays out the header: the logo at one end, the navigation at the other.
  • position: sticky keeps the header in view while the page scrolls.
  • CSS Grid arranges the exhibit cards, and a media query stacks them on phones.
  • max-width and margin: 0 auto centre the content on wide screens.
  • :hover, transition and transform make the cards lift smoothly.

Once the variables exist, every colour on the page can come from them:

.site-footer {
  background: var(--dark);
}

Assignment

Build the Grand Gallery landing page. Define the variables where the first comment says, change the hard-coded values in the existing rules, and write everything else below the second comment:

  1. Variables: in a :root rule, define --accent: #f5b301, --dark: #2b2620 and --radius: 16px. Use them instead of the hard-coded values: the .site-header and .site-footer backgrounds become var(--dark), the .btn background becomes var(--accent), and the .feature-card corners become var(--radius).
  2. Header: make .site-header a flex container with the logo at the left end and the navigation at the right end, vertically centred. Make it sticky at the top (position: sticky, top: 0) with z-index: 10.
  3. Navigation: make .site-nav a flex container with a 24px gap. Hovered links (.site-nav a:hover) get the colour var(--accent).
  4. Content: give .container a max-width of 960px and centre it with margin: 0 auto.
  5. Centred text: centre the text of .hero and of .site-footer (text-align: center).
  6. Cards: make .features a grid with 3 equal columns (repeat(3, 1fr)) and a 24px gap.
  7. Hover effect: give .feature-card a transition on transform (for example transition: transform 0.2s ease) and lift it 4px in .feature-card:hover with transform: translateY(-4px).
  8. Phones: at 600px and below (@media (max-width: 600px)), the cards stack in 1 column.

Each passing test breaks one of the Guardian's seals. Break all ten and the Grand Gallery is yours.

Premium lesson

Unlock the full Learn HTML & CSS course

  • All 29 lessons, bosses and quizzes — lifetime access
  • One payment of $35, no subscription
  • Finish within 30 days and claim $10.50 (30%) back
Play the 7 free lessons

Want more than one course?

The All-Access Pass unlocks all 8 courses and every new one we release, for $120 once.

Keep learning

Need a quick reminder? The HTML & CSS cheat sheet has every topic of Learn HTML & CSS on one page.

Lesson last updated on .

Write code ↓
HTML & CSS+100 XP

Lesson 29 is part of the full course. The first 7 lessons are free.

Premium lesson

Unlock the full Learn HTML & CSS course

  • All 29 lessons, bosses and quizzes — lifetime access
  • One payment of $35, no subscription
  • Finish within 30 days and claim $10.50 (30%) back
Play the 7 free lessons

Want more than one course?

The All-Access Pass unlocks all 8 courses and every new one we release, for $120 once.