Ofcourse, can I usedotcomis a greatwebsitetoseewhichpropertiesandvaluesthosecombinations, whichofthosearemorewidelysupportedsoyoucanuseyourowndiscretionandyoucanalwaysusefallbacksaswell.
Otherthing I wanttotellthatyouknow, isFlexBoxis a largeareaofstudy.
It's notjust a quicklittlepropertyor a quicklittlestyleisactually a lottoit, and I don't wanttocoverthemassiveamountoftheoryinvolvedinFlexBox.
Andthereasonwhy I dothatissothatthosestylesdon't conflictsothatthefinalhomework, thefinalresultdoesn't conflictwiththesandbox.
Solet's jumpin.
Now, keepinmind, thisisn't gonnabe a theorylesson.
Soifyou'veneverheardofflexflexboxbefore, a certainpieceofpartsofthismightbe a littleoveryourhead, sogivingyou a fairwarningrightnow, I'lldomybesttoexplaincertainthings.
But I dorecommendyoureadthatChrisCoyerguideonFlexBoxshouldtakeyouabout 15 20 minutesorsojustsoyoucanunderstandwhat's goingonwhenwestartplayingaroundwithsomeproperties.
Youmaybeneverheardoforlate.
Onemainwereselectingthemaintagwithinlateone.
We'regonnatell a displayflexsoinsteadoflike, inlineorblock, we'regonnasayflex, andthat's goingtotelleverythingwithinthemeancontentinthatmeantagtotobeawarethatthisis a flexitem, thisflexcontainerandtheflecksdirectionisgoingtoallowustotellTellthebrowserhowtodisplaythedirectionofthecontent.
Butif I don't wanttojustalwaysbetwotimesthewidthorthreetimesthatwithwhatif I wanttofindTunethatwell, youactuallycandothatquiteeasily.
So I'm gonnaremoveasidehereandjuststylethearticlegonnaseeflecksoneas a basis, and I'm gonnasay 58% now, thisisessentiallythisvalueisgoingtotellitthewig, themaximumwidthandthat's nottechnicallymaximumwith.
Butit's thespacethatyouwantedtotakeupsoyoucankindofoverridethat 1 to 1 ratioandthenrefresh.
Nowit's taking 58% ofthewidthofthatcontainerNow.
What I findinterestingis, if I weretochangethisto 50% it's gonnagotoitsregular 50% width.
Butif I weretogoto 100% it's notgoingtoactuallyfillitout 100% becauseFlexBoxknowsthatthere's still a containerthere, soit's notgonnapushitdown.
Itstillneedstofitwithinthere.
Soit's Thisisroughly I don't reallyknow.
Itlookslikeit's around 75% so I'm notreallyentirelysureofthereasonwhyitdoesthat, butit's kindofsmart, so I'm gonnagobacktomy 58% withahspacethere.
Now, theproblemistheseairjammedupagainstoneanother, someone a littlebitofspace.
Ah, andwouldbethere's a littlebitofhackerygoingonthereifif I wastryingtodothatandjustfloatsandclearsandsoonandsoforth.
SoRoreverses a nicevalueforflexdirection, But I'm gonnaputitbacktohere, andthat's itforthefirstlayout.
That's allwehadtodonowif I hadtodothisandjustfloatsandclears, I wantedtodomathandwouldhavehadthingscollapsingandwouldhavebeen a littlebitstressfulandconfusing.
Nowthat's nottodiminishhowmuchisgoingonhere.
There's a lotgoingonwithshorthandproperty.
I encourageyoutoreadaboutitandtestitandplayaroundwithit.
Soifyouwanted a backgroundlikeontheseelementsthattomaintainthesameheightasthegrowingcontent, it's veryeasilyandautomaticallydonewithoutyouhavingtodoanythingandflexbox.
Sothat's cool.
Solet's moveondowntofixthoseasidebecause I don't likehowtheylook.
Layouttooaside, sidenowandthesidebar.
Now, if I just a flexonesotheyfit, they'reavailablespace.
Let's seewhatthatdoes.
Sonowthingsarelookingweirdbecausenow I havetheselookingwaytoosmall.
Justusing a couple a coupleofselectorshere, Sothat's reallycool.
Nowlet's movedowntolayoutnumberthree.
Nowwe'regonnasayiswhenit's a layoutthreeheaderthat's gonnabedisplayflexagain, ofcourse.
Andthenflexdirection.
Rowreverseswhatwe'regonnado.
Playaroundwith a littlebit.
Nowit's a layoutthreeheaderandselectthatknave.
We'regonnatellittobeflecksofoneandlet's seewhatthatdoes, andyoucanseethatthelogoisontherightbecausewesaid, ro, reverseif I justhad a rowthatlogosontheleftside.
But I wantontheright.
I don't changethemarket, butalltheorderofthemarkup, I'm justusingflexboxtotellitwheretogo.