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 trialThea Ilona
2,014 PointsGrid doesn't add up, bumps to next line
Hello!
I've been coding for about 9 years now, and I found Tree House to be very helpful in teaching me CSS stuff that I didn't know. One of those stuff is grid, which is quite in demand here in my country right now.
I basically copy-pasted the HTML & CSS from the downloaded package and tweaked it myself to accommodate 10 columns (instead of 12) in a 1000px container, and changed them to percentages.
It was fine before I changed it 10 columns, so it might be my calculations that's off. But I'm pretty sure that the numbers are correct.
http://theailona.com/alpha/ or http://cdpn.io/HjiKt
Mind lending me a pair of fresh eyes? :D
edit - someone suggested display: inline-block; to be applied to the classes of grid 2, 3, 7 & 8. but the original document from Tree House didn't use it, so I'm in a bit of doubt if it's the solution to my problem.
2 Answers
Matt Campbell
9,767 PointsPut the actual code up, much better then having to go through a page inspecting all the elements.
Colin Marshall
32,861 PointsRemove the comma after .grid_10 in this declaration:
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6,
.grid_7,
.grid_8,
.grid_9,
.grid_10,
{
margin: 0 3% 0 0;
float: left;
display: block;
}
Thea Ilona
2,014 PointsOh wow! Thanks! :D