Andifyousaythat, you'llseethatwehave a greatboxshowupontherighthere, andthat's because I'vealreadyappliedsomestylestothesefucksboxitemssowecandistinguishthemandseethem.
Nowlet's copythisandaddingtwomorefluxboxitemsandsavethatyou'llseethatwehavenowthreefluxboxitemsinsteadofourfucksboxcontainer, butwedon't haveanystylingtoactuallymakethis a flexcontainer.
Sotogetstartedwithcreating a flexcontainer, what's goingtoourstyles?
Now, if I saythat, youseethatallofouritemsarenowthesameheightandtheyallshowupinonerow, you'llalsonoticethatif I shrinkourbrowser, you'llseethattheseitemswillscaletheirsizetofitwithinthebrowser.
Andas I makeitwideenoughforthemtoallfit, you'lljustshowupontheleftsideofthescreen.
Thisisbecauseourfucksboxcontainerislaidoutin a rowasopposedto a column.
Flexboxgivesus a propertyonthecontainercalledFlexDirection, wherewecansetifwewantourflexboxtobe a roworcolumnbasedlayoutanddependentonthis, thesemainaccessandcrossaccesswillactuallyflip.
Soin a columnbasedlayup, thecrossaccesswillgohorizontallyandthemainaccesswillgovertically.
NowyoucanseethattheLexxendfor a lineofcontenthasmadeourfluxboxitemsallwomenatthebottomofourcontainer, whileFlexStartwillmakethem a lineatthestart, andthishasverysimilarpropertiestojustifycontent.
Ifweused a lineitemsweputcenterinhereandsaythatyou'llseethatnowareitemsaircenteringhorizontallybecauseofthecrossaccessishorizontalinsideof a columnbasedflexboxcontainer.
insideofthefluxboxcontainertogroworshrinkasyouneed a shorthandforthesedifferentfluxShrinkgrowandBassistPropertiesisjust a straightupflexpropertywherethefirstnumberis.