Lesson 47 of 50
cssCSS Grid + Flexbox Hybrid Layouts
11 mins
Course progress94%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 47 of 50
css11 mins
Keep these ideas in mind as you work through the lesson.
Combine Grid for the overall page structure and Flexbox for inner component alignment.
.page {
display:grid;
grid-template-columns: 1fr 3fr;
gap:2rem;
}
.sidebar { display:flex; flex-direction:column; gap:1rem; }
.main { display:flex; flex-wrap:wrap; gap:1rem; }
<div class="page">
<aside class="sidebar">…</aside>
<main class="main">…article cards…</main>
</div>