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 Layout Techniques Flexbox Layout Flexbox Layout Challenge

Next, 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

"List item" is the clue.

.main-nav li { /* Target the items wrapped in the li(st) tags */
  flex-grow: 1;
}
Malith Senanayake
Malith Senanayake
12,488 Points

This is the correct way. "li" should be added.

Its trying to be a bit of a trick question..... if u read closely it wants to target every LIST item inside the .main nav

Use flex-grow attribute (http://css-tricks.com/almanac/properties/f/flex-grow/)

.main-nav {
   flex-grow: 1;
}
Amil Boddie-Willis
Amil Boddie-Willis
9,661 Points

I, just, tried that, and it didn't work... :(

lancelittlefield
lancelittlefield
12,261 Points

I'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.

i agree the question is a little bit confusing !!

.main-nav li{ flex-grow: 1; }

So 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.

.main-nav { display: flex }

.main-nav li { flex-grow: 1; }

}