Flexbox: Navbar and Cards
A navbar is a flex row with space-between. Cards use flex-wrap with flex: 1 1 200px so they fill rows and wrap on small screens.
Example
<style>
.nav { display: flex; justify-content: space-between; background: #1e293b; padding: 8px } .cards { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px } .cards div { flex: 1 1 100px; background: #0f766e; padding: 10px }
</style>
<div class="nav"><b>Logo</b><span>Menu</span></div><div class="cards"><div>A</div><div>B</div><div>C</div></div>Exercise
Wrap cards.
flex-wrap: ;
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.