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 trialdaniel steinberg
14,651 PointsPrimary and Secondary Column width
Before adding "flex: 1:" and "flex: 2;" to the media queries, why does the Primary take up 2x the width of Secondary at 769 min width? Why are they not the same width? I see nothing in base.css that would cause this. Thanks
2 Answers
Jamie Reardon
Treehouse Project ReviewerThe primary column has more content than the secondary column. By default, it will obviously take more width than the secondary column because of this.
They both share the class col, and therefore, the teacher adds flex: 1 to the 769px media query. By adding this css property, the two columns become of equal width.
Alex Hort-Francis
17,074 PointsInterestingly, I tried commenting out and deleting some of the text from the primary column, and the original layout remained.
It makes sense to me that the flex container .row would decide how wide each flex item should be based on overall text amount: it would over-spill horizontally so that each flex item (primary & secondary) take up the same amount of vertical space in the row.
So I'm also confused as to why this then doesn't change if I take away some of the text from the primary column. I'm left with some white space after the content of the primary column, and the primary still takes up more horizontal space than the vertical.
Does anyone know why this is?