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
Jordan C6,249 Points
Can you use "margin-right: auto;" on the name in the header to make it so the name and nav are against opposite edges?
This would be instead of "justify-content: space-between;"
Steven Parker228,991 Points
When using flexbox, always try to do things the "flexbox way".
If there are only two items, then since "
justify-content: space-between;" is intended to do exactly what you want, that would be the best-practice choice.
Using auto margins could be a good choice when you have multiple items to group together on opposite sides, but you may be able to achieve the same effect with combinations of "
justify-content" on the container and "
justify-self" on the items(s) to be aligned differently.
I agree with Steven Parker.