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

Calvin Maighan
Calvin Maighan
12,061 Points

CSS Layout Techniques: Flexbox Layout Challenge (HELP!)

I watched the videos and completely understood, or so I thought. Now, the challenge is asking me to change the order of the columns in flexbox.

Here is my code:

    .secondary {
    display: flex;
        order: -1;

I am pretty sure this is supposed to work, cause nothing in the videos would indicate otherwise...

If I did something wrong please let me know!

1 Answer

Jacob Miller
Jacob Miller
12,466 Points

You need to remove the display: flex; from .secondary. "A flex container expands items to fill available free space, or shrinks them to prevent overflow," so you only need to add display: flex; to the containing element.

Calvin Maighan
Calvin Maighan
12,061 Points

Wow, I don't know why I didn't try that. Guess I was a little frustrated that whatever else I tried didn't work... Thanks a million! :)