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 trialbrevans26
15,198 PointsReordering Links
Why Gil adds "order-1" to a class to flush it to the top right of the container and not "order-12"? Adding the first option wouldn't flush the content to the left, since "1" represents the first quadrant of the grid system?
brevans26
15,198 PointsSorry Matt Brock!
I thought I posted on the questions related to the video I was watching. My bad. The course/video I'm talking about is "Bootstrap 4 Basics/Building a Navbar."
2 Answers
Matt Brock
28,330 PointsAh! So, because Bootstrap uses Flexbox to control layout in its .navbar
element, setting an .order
class on a single link allows you to force it to reposition, regardless of where it is in the HTML markup. When you add an .order
class to that one element alone, it shifts to the right side of the .navbar
element since it's the only item with a Flexbox order declared. If you add an .order
class to a second element in the .navbar
, you can see how it affects the order of the items based on which .order
class you assign.
Check out the Bootstrap Documentation for a visual explanation with markup.
brevans26
15,198 PointsThanks sir!
Matt Brock
28,330 PointsYou're welcome!
Matt Brock
28,330 PointsMatt Brock
28,330 PointsWhich course are you referring to?