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 Flexbox Layout Building a Layout with Flexbox Building a Navigation Bar with Flexbox

Jess W
Jess W
4,391 Points

Setting the .main-nav to align-self: center; Vs the parent .main-header align-items: center;

I was wondering if there's a difference in how the structure of the overall page is affected if I were to only adjust the .main-nav align-self:center VS the .main-headers align-items: center; ? Is it considered better practice to change the parent container and not the child in this case? if that makes sense?

@media (min-width: 769px) { .main-header, .main-nav { display: flex;

.main-header { flex-direction: column; align-items: center; }

/* ----Setting the .main-nav instead? ---- / / .main-nav { align-self: center;

} */ }