Chapter practice task
Task: Lay out a services section and a portfolio gallery
- Turn your header into a flex row with the logo on the left and links on the right.
- Center your hero text vertically and horizontally.
- Build a three-column services section with Flexbox and
gap. - Build a portfolio gallery with Grid that changes columns automatically by screen size.
- Make one gallery item span two columns.
By the end of this chapter
- You can build rows and columns with Flexbox and control alignment and spacing
- You can center any element in at least three ways
- You can build responsive grids without media queries
Quick answers for this chapter
Flexbox or Grid?
Flexbox for one direction (a row or a column), Grid for two directions (rows and columns at once).
Do I still need floats?
No. Floats are only for wrapping text around an image now.
Do Flexbox and Grid work in all browsers?
Yes, in every modern browser.