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 Framework Basics Build a Website with Foundation Building with Nested Grids

Foundation Grid Class Order

Throughout the foundations course when demonstrating grid layout Guil is making it a point to give an element the column size/count class first, and then the columns class.

Ex.

<div class="large-6 columns"> 

Is Guil doing this because of a class priority issue, or is it just habit? In other words is

<div class="large-6 columns">

Equal to

<div class="columns large-6">

I have tried making the changes and I didn't notice a difference.

3 Answers

geoffrey
geoffrey
28,736 Points

Honestly I don't remember exactly the course as I followed it some months ago. But you are right, class order doesn't matter when you assign them to you class attribute. It only matters when you specify your selectors.

Guil is probably very consistent to be sure people memorize easily what he teaches.

geoffrey
geoffrey
28,736 Points

The fact you don't notice any difference is normal, the order when assigning classes has no matter. That's why.

Thanks for the fast response. I believe you are correct, that is what I thought too. Class order does not matter except for very specific cases, with complex selectors.

While watching the videos it looks like Guil is very consistent. He types columns first then he backs the cursor up and types the column size and count class. I could be wrong and this could just be a habit, but when Iā€™m watching I get the feeling that Guil knows something about foundation grid class order that I do not know.