Building a Complete Responsive Website
The capstone project — a full, real, responsive website built end-to-end using everything from this entire track.
Every Technique From This Entire Track, in One Real Build
This module builds a complete, real, responsive marketing site for a fictional studio (Ridgeline Design Co.) end to end — a hero section, a navigation bar that collapses on mobile, a responsive content grid, and a footer. Every technique used is one already covered somewhere earlier in this 42-module track; this module's job is showing how they compose into one genuinely working page, not teaching anything new.
Semantic Structure First, Styling Second
<body>
<header class="site-header">
<a href="/" class="logo">Ridgeline Design Co.</a>
<button class="menu-toggle" aria-label="Toggle menu" aria-expanded="false">☰</button>
<nav class="main-nav">
<ul>
<li><a href="#work">Work</a></li>
<li><a href="#services">Services</a></li>
<li><a href="#contact">Contact</a></li>
</ul>
</nav>
</header>
<main>
<section class="hero"> ... </section>
<section id="work" class="project-grid"> ... </section>
<section id="services" class="services"> ... </section>
<section id="contact" class="contact"> ... </section>
</main>
<footer class="site-footer"> ... </footer>
</body>The document is planned as landmarks first — header/nav/main/section/footer — exactly the Phase 1 semantic structure approach, before a single CSS rule exists.
Starting From the Smallest Screen, Per the Mobile-First Module
:root {
--color-ink: #1a1a1a;
--color-accent: #ff4757;
--spacing-unit: 8px;
--max-width: 1200px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
font-family: system-ui, sans-serif;
color: var(--color-ink);
line-height: 1.6;
}
.site-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: calc(var(--spacing-unit) * 2);
}
.main-nav {
display: none; /* hidden by default on mobile — revealed by menu-toggle */
}
.main-nav.is-open {
display: block;
}This uses the custom properties from that module for a real, working design token system (--color-accent, --spacing-unit), and follows box-sizing: border-box from the Box Model module as the very first rule in the reset — the base every later measurement assumes.
Centering and Layout From the Flexbox Modules
.hero {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
padding: calc(var(--spacing-unit) * 8) calc(var(--spacing-unit) * 3);
}
.hero h1 {
font-size: clamp(28px, 6vw, 56px);
max-width: 20ch;
}
.hero p {
font-size: clamp(16px, 2.5vw, 20px);
max-width: 60ch;
color: #666;
margin-top: var(--spacing-unit);
}clamp() from the Responsive Design module handles the heading and paragraph's font size scaling smoothly across every viewport width, with no discrete breakpoint jump needed just for typography.
A Genuinely Responsive Grid With No Media Query at All
.project-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
gap: calc(var(--spacing-unit) * 3);
padding: calc(var(--spacing-unit) * 6) calc(var(--spacing-unit) * 3);
max-width: var(--max-width);
margin: 0 auto;
}
.project-card {
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
transition: transform 0.2s ease;
}
.project-card:hover {
transform: translateY(-4px);
}repeat(auto-fill, minmax(260px, 1fr)) — directly from the CSS Grid in Practice module — reflows the number of columns automatically as the viewport changes, with zero media queries needed for this specific grid at all. The hover lift on .project-card uses transform, not top/margin, following the cheap-vs-expensive property guidance from the Transitions module.
Where a Media Query Genuinely Is Needed
@media (min-width: 768px) {
.menu-toggle {
display: none; /* the hamburger button only exists below this width */
}
.main-nav {
display: block; /* the nav is simply always visible on wider screens */
}
.main-nav ul {
display: flex;
gap: calc(var(--spacing-unit) * 3);
list-style: none;
}
}This is the Flexbox vs Grid module's decision framework applied for real: the overall page uses Grid for its two-dimensional project layout, Flexbox for the one-dimensional horizontal nav-link row — each reached for specifically where it fits, not out of habit. The 768px value itself was chosen the way the Responsive Design module recommends: by resizing this specific nav bar's actual content and finding where it starts to feel cramped as a horizontal row, not copied from a framework default.
Bringing Back Phase 1's Forms, Styled
<section id="contact" class="contact">
<h2>Get in Touch</h2>
<form action="/submit-contact" method="POST">
<label for="name">Name</label>
<input type="text" id="name" name="name" required>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
<button type="submit">Send</button>
</form>
</section>input:focus-visible,
button:focus-visible {
outline: 3px solid var(--color-accent);
outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
.project-card {
transition: none;
}
}prefers-reduced-motion query from the Accessibility module disables the hover-lift transition for users who have indicated they prefer reduced motion at the OS level.Testing Across the Full Range, Not Just a Few Presets
The last step, matching the Responsive Design module's own advice, is dragging the browser window slowly across the entire width range — not just checking a fixed list of device presets — watching specifically for the moments the hero text wraps awkwardly, the project grid's column count changes, and the nav toggle switches between its mobile and desktop states, confirming each transition looks intentional rather than abrupt or broken.
A Freelancer's First Full Client Delivery, Built From Exactly This Pattern
A newly freelance developer delivers a small studio's marketing site — structurally almost identical to this module's build — and the client comes back a week later specifically praising how well it "just works" on their phone, without ever having asked for mobile support explicitly.
What actually earned that reaction
Nothing exotic — a mobile-first base, a single well-chosen breakpoint for the nav, Grid's auto-fill/minmax() handling the project layout's column count automatically at every width, and real semantic HTML that search engines and screen readers alike could parse confidently. The developer's own reflection: "the client had no idea any of these specific techniques existed — they just experienced a site that behaved correctly everywhere, which is the actual point of everything in this whole track."
Four Misconceptions About Building a Real Responsive Site
4 Interview Questions — With Complete Answers
Mistakes Beginners Make Building a Full Responsive Site
Issues You Will Hit Building a Full Responsive Site — And Exactly Why
🎯 Key Takeaways
- ✓A real responsive build starts from semantic HTML structure — landmarks and sections planned before any CSS exists, exactly as Phase 1 established.
- ✓Mobile-first base styles, then progressive enhancement via min-width media queries, produces leaner CSS than a desktop-first, override-heavy approach.
- ✓Grid and Flexbox are used for what each is actually suited to in the same page — Grid for the two-dimensional project layout, Flexbox for the one-dimensional nav row — not chosen out of habit.
- ✓auto-fill combined with minmax() can make a grid genuinely responsive with zero additional media queries for that specific layout.
- ✓Every form field keeps a real associated label, and focus-visible states plus prefers-reduced-motion respect real accessibility needs, not just visual polish.
- ✓Final testing means continuously resizing across the full viewport range, not just checking a handful of fixed device presets — the gaps between presets are exactly where real bugs hide.
🏗️ The Capstone Project
Two modules remain — best practices, then the full interview prep synthesis.
This build pulled together structure, layout, responsiveness, and accessibility from across the entire track into one real, working site. Module 41 closes out with the conventions and common mistakes that separate maintainable CSS from a stylesheet nobody wants to touch, and Module 42 — the capstone — synthesizes everything into interview-ready form.
Module 41 → CSS Best Practices & Common MistakesDiscussion
0Have a better approach? Found something outdated? Share it — your knowledge helps everyone learning here.