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 Build a Simple Website Creating a Website Structure Working with Grids

Mary O'Gorman
Mary O'Gorman
1,482 Points

I want to have 3 rows using the grid but it doesn't seem to be clearing for me.

I have a grid_12 with min width 320 centered in the page and I have three grid_4 underneath making three columns. My problem is that they are going underneath my grid_12.

Hi Mary, out of the info that you provided, having a grid_12 being stretched 100% the width of your page, ( I believe you have it setup as a block or in-line block element) , which means that any other element that's specified under that bit of code within your html document will go underneath that grid_12 section of your site.

Its a natural behaviour of html elements. If you would like to have your grid_4 x 3 above your grid_12, swap them over in your html document and state the grid_4x3 before the grid_12.

Hope i understood your query in the right way and it helps to resolve you problem.

If it doesn't, please paste in your code into this forum so that we can identify exactly what's happening with your code.

Happy coding :)

2 Answers

Brendon Conradie
Brendon Conradie
3,130 Points

Do you have a code snippet? Floats, clearing, display: inline-block (good ole hidden margin) and percentage values can really get a little tricky sometimes when it comes to column like layout.

Mary O'Gorman
Mary O'Gorman
1,482 Points

Hi Pev and Brendon,

Sorry for not replying sooner. Brendon I wasn't sure how to paste the code correctly in the forum and that's why I didn't, i'll look it up though for future reference.

Pav, I got mixed up with my positioning, I had absolutes and heights where I shouldn't of had them. Thanks very much for getting back. I hope I can contribute to this forum properly some stage.

Thanks again,

Mary