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

CSS CSS - Beyond the Basics Understanding Flexbox and Multi-Column Layout Flexbox: flex-grow, order, align-self

Peter Zee
Peter Zee
12,417 Points

Hi, I was wondering. Isn't column C taking op 3/5 of the available space instead of 2/4? (2:57)

I know he says "about", but I just want to be sure if I understand the concept explained in the video.

Best Regards,

Peter

2 Answers

Hi Peter, I definitely understand the confusion. I'm still figuring out how it calculates the spacing as well. That being said, I found this article pretty helpful: http://www.smashingmagazine.com/2011/09/19/css3-flexible-box-layout-explained/

It breaks down the logic behind the spacing a little better. In the case of Guils example, the column margins are reducing the width of each column, which is why column C doesn't appear to be 2/4ths (or 1/2) of the container. If you remove the margins from the columns, you'll see that column C is exactly 1/2 the width of the container.

Peter Zee
Peter Zee
12,417 Points

Hi Lindsey, Thank you for your explanation! Now this is also clear to me. I will now start reading the article you suggested; thank you for helping me out with this.

Greetings from Peter