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 trialAshley Scott
6,426 PointsNext, use the flexbox property and value that gives every list item inside main-nav evenly distributed widths.
This what I have what's wrong with it.
@media(min-width: 611px) {
}
.main-nav{
display: flexbox-width;
}
9 Answers
Darren Healy
Front End Web Development Techdegree Student 23,565 PointsI think the way this question is asked isn't too clear and should be reviewed.
Blake Hutchinson
21,695 Points"List item" is the clue.
.main-nav li { /* Target the items wrapped in the li(st) tags */
flex-grow: 1;
}
Malith Senanayake
12,488 PointsThis is the correct way. "li" should be added.
Andrew Nitzschke
8,521 PointsIts trying to be a bit of a trick question..... if u read closely it wants to target every LIST item inside the .main nav
Daniel Widyanto
5,626 PointsUse flex-grow attribute (http://css-tricks.com/almanac/properties/f/flex-grow/)
.main-nav {
flex-grow: 1;
}
Amil Boddie-Willis
9,661 PointsI, just, tried that, and it didn't work... :(
lancelittlefield
12,261 PointsI'm going to agree with Darren. Either the video should be a little more concise or the question should be looked at. One of the few I've had problems with though.
AHmed AlThani
4,773 Pointsi agree the question is a little bit confusing !!
MIK Agency
22,496 Points.main-nav li{ flex-grow: 1; }
Jeremy Woodbridge
25,278 PointsSo this challenge is worded poorly however the rules to applying styles are a little more specific than you may think
.main-nav {
display: flex;
flex: 1;
}
.main-nav li {
flex-grow: 1;
}
As well for the next 2 steps in the challenge, make sure they have specific selectors to the question being asked.
Marcos Santana
6,520 Points.main-nav { display: flex }
.main-nav li { flex-grow: 1; }
}