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 trialThomas Swofford
1,399 Pointsplacement in grid & .clear class
When you put an element in a grid, example <div> in grid 3 of 12 is it starting at grid 1 and ends in grid 3 or does it start in grid 3?
also is there further explanation of the clear class. I understand about 1/2 of it.
2 Answers
Andrew McCormick
17,730 PointsIf you look at the grid.css file (http://treehouse-code-samples.s3.amazonaws.com/WWIsland1/stage3/css/grid.css) You'll see .grid_3 { width: 235px; }
and that all the grid items are floated left and block. So all you are doing by setting the element to grid_3 is giving it a width of 235px and floating it left.
It starts where every you have it positioned to starts and spans 235px.
It could be positioned like this:
|--- grid_3 element ---------------|-other grid element'---|-- |other element--|
or even like this
|-grid_1 element-|-grid_1 element-|-grid_3element--------------|
does that make sense?
Thomas Swofford
1,399 PointsThank you