Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Michael Trilford
7,232 PointsFlex layouts
Flex layouts really confuse me. I have made it my weeks mission to understand them.
To be very honest, I have found it extremely hard to have some items 100%, while having others floated next to each to other. This is really easy to do with floats, but I am trying to desperately understand the Flex property.
I think I have cracked it. The "flex" property you use on children was my downfall. I have worked out that "flex: 1 1 100%;" is my friend. This will allow me to do wonderful things quite easily.
I know people are adding consistent padding around items to have a similar effect, but the desire is to have it flush left and right with the width of the page.
Check out this link where I have been wrecking my brain: http://codepen.io/boostnewmedia/pen/bChAG
If anyone has any suggestions to make things easier, please suggest.