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 - Beyond the Basics Understanding Flexbox and Multi-Column Layout Flexbox: justify-content and flex-wrap

Jim McQuarrie
Jim McQuarrie
10,597 Points

No margin effect

when I type in the

.nav li:first-child { margin-left: auto; } There is no effect, any ideas

4 Answers

ravindra barthwal
ravindra barthwal
2,271 Points

why not you share your workspace so that we can tell you better. But i think you should also add

dispaly: inline-block;

Are you sure its not supposed to be margin-right?

Also if you are doing this with a media query then it might not show the effect until the screen is resized. As said before it is best to show your code because I am sure it is something very simple

ravindra barthwal
ravindra barthwal
2,271 Points

Yup! we can able to guess only until we don't see the code

HI, are you sure it is the class nav not a tag nav, if it is a tag nav, than you should exclude the dot before the nav.