CSS Master

(Primo) #1
Figure 4.36. Creating components in a grid with flexbox

Thisgridlooksabitawkward,though:oursecondrowhasagap.Let’sfixthat.We
justneedtochangeourflex-growvalue:

.grid > * {
flex: 1 0 25%;
}

Nowtheelementsinoursecondrowwillexpandevenlytofillthecontainer,as
presentedinFigure4.37.

174 CSS Master

Free download pdf