Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Why flex-grow is not working?

Hi, at the breakpoint on 769 px I want the columns to take the same amount of space so in the flexbox.css in the media query I put the commend flex-grow: 1; for both of the columns. Why it's not working? https://w.trhou.se/wh0q9nhayf

1 Answer

Steven Parker
Steven Parker
221,500 Points

The default flex-basis (auto) adjusts the widths to take up the least vertical space. Try setting a fixed value (0, for example) for flex-basis to make the widths even.

You could also use the shorthand "flex: 1" instead of "flex-grow: 1" to set them both at once.