CSS Flexbox Basics
Enable Flexbox
.nav {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
}
Flexbox is designed for arranging items along one main axis, with alignment on the cross axis.
Useful properties
.row { display: flex; flex-direction: row; }
.wrap { flex-wrap: wrap; }
.item { flex: 1 1 15rem; }
.center { display: flex; align-items: center; justify-content: center; }
Practice
Build a responsive navigation row that wraps when the available width is limited.
Want to learn this professionally?
Explore practical IT training at Cyber Code Academy.
View Academy Courses