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!

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

CSS CSS Flexbox Layout Flexbox Properties Smarter Layouts with flex-basis and flex

Flex grow and flex basis

If I understand well, a flex-basis value of 0 makes the browser unable to redistribute the space even if you have a flex-grow value?

1 Answer

Jamie Reardon
.a{fill-rule:evenodd;}techdegree seal-36
Jamie Reardon
Treehouse Project Reviewer

Flex-basis sets the initial width value of the flex-items. When you have the flex-wrap value set to wrap, the flex-items will start to wrap to a new line when this threshold value can not fit on one line. Flex-grow expands the flex-items, allowing them to grow into the available space of a flex-container. A value of 1 will distribute the space evenly between each of the flex-items, meaning you will have equal width flex-items.