Tyler Halstead7,987 Points
Why do you have to target individual classes when using the display property, but not the align-items property?
It seems like in order to display main-header and main-nav as flex, they both have to be directly targeted in CSS, yet if you wanted to center align the list in main-nav, you can just target .main-header and use align-items. Are the 2 properties treated differently in some way?
Liam ClarkeTreehouse Moderator 19,841 Points
I think your talking about the relation between parent (container) and children (items) in flexbox.
Flexbox uses the relationship between the two to create the layout. As above you mentioned adding display flex to the container will define the element as a flexbox container. Adding align items center is now talking about all direct children to that container.
so if main-header is defined as a flex container and the direct children is the main-nav then using the
align-items property will target all direct children on the main-header.