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 trialJustice Avery
8,122 Pointshelp
Create a child selector that targets li elements that are direct children of .main-nav. Set the display to inline-block and the left margin to 20px.
8 Answers
Andrew Hansen
Courses Plus Student 6,454 PointsUse the ">" character to target direct descendants.
.main-nav > li {
display: inline-block;
margin-left: 20px;
}
MUZ140526 Alex Mawene
2,687 Pointsthis one works for me yu can try it .main-nav > li { display: inline-block; margin-left: 20px; }
channonhall
12,247 PointsThanks!!
Malachi Lythgoe
8,524 PointsIf main-nav is a ordered or unordered list then you don't need the ">" character to target direct descendants.
.main-nav li { display: inline-block; margin-left: 20px; }
Justice Avery
8,122 Pointsits not letting me pass on to the next step
Malachi Lythgoe
8,524 PointsThere is probably some kind of content I don't know about from the video before the quiz. Send me a link and I will figure it out for you
MUZ140587 Matifadza Foyo
9,182 PointsYou can try this one, hope it works .main-nav > li { display: inline-block; margin-left: 20px; }
Ian Z
14,584 Pointswow none of these work
MUZ140634 Kudzai Gwara
5,344 Points/* Complete the challenge by writing CSS below */ .main-nav >li{ display: inline-block; margin-left: 20px; }
MUZ140634 Kudzai Gwara
5,344 Pointsthanx i mannaged to pass that.
Justice Avery
8,122 PointsJustice Avery
8,122 Pointsit said Make sure you're targeting img elements in your selector.