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.

CSS CSS Flexbox Layout Building a Layout with Flexbox Building a Navigation Bar with Flexbox

Why .main-header is not stack as a column?

At 5:41 .main-header is set to column but it doesn’t seem to be column but as row. Column layout stack on each other but at browser they seem to be on next line in row format?

Christopher Gardner
Christopher Gardner
12,719 Points

When the .main-header is set to flex it only applies to the direct child elements. So this will create a column using the <h1> container and the <ul> container as a whole. Since the <li> elements are child containers of the <ul> container and not the .main-header they are not affected.