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 trialJoseph Quintiliano
Front End Web Development Techdegree Graduate 14,338 PointsThe understanding behind Order-1
I understand "order" acts similar to z-index
, index
through numerically starting at 0. But how does order-1
know we also want the content justified to have space between ?
1 Answer
Travis Alstrand
Treehouse Project ReviewerHey Joseph Quintiliano !
So I don't believe that order
would add any other styling to an element besides the order it appears in a list of flex items. -1
should ensure that it is the first in the list. I believe the parent container would have to have justify-content
and other settings already applied to affect these children in a specific way.
This page shows some cool examples of what different values can do with order
.
Also, z-index is a bit different in that it's affecting the element's "depth" and how it overlaps or is overlapped by other elements.
I hope this helps! Please post a link to the video you were watching if something sounds conflicting here to what you were taught.