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 trialCraig Watson
27,930 PointsSass Grid from Modular CSS with Sass ?
Hi everyone!
I have been doing the Modular CSS with Sass course and the thought Sass generating my grids from now on is awesome!
But I have transferred all the code I thought Guil Hernandez had used to codepen here and its all gone horribly wrong.....
I'd really like to get this down and working well so its usable for others any help will be much appreciated!
Craig
1 Answer
Colin Marshall
32,861 PointsYour problem is that the padding you have is not included in the width of your columns, so you can't fit all the columns in one row. The solution is simple, add this to the top of your SCSS:
* {
box-sizing: border-box;
}
This makes it so padding and borders are included in the calculation of an element's width.
Craig Watson
27,930 PointsCraig Watson
27,930 PointsIts amazing what can be overlooked .... Thanks a lot Colin... :D