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
taahrqqhar
14,147 Pointssomeone please help me with css gutters
I'm basically doing a site from scratch and I'm using my own grids i'm doing a 960 grid with a 20px margin and gutter... but I cant get it right... it's always 20px off or 10px off can someone please help me. I really dont want to use a framework because I feel I'm not learning and just being lazy.
```.media { background:rgba(0,0,0,0.7); max-width: 960px; margin: 0 auto; color:#FFF; }
.col-mediagroup { display: inline-block; width: 450px; padding: 20px 0 20px 20px; }
[class*='col-'] { padding-right: 20px; } [class*='col-']:last-of-type { padding-right: 20px; padding-left: 0; }
2 Answers
taahrqqhar
14,147 Points``` .media { background:rgba(0,0,0,0.7); max-width: 960px; margin: 0 auto; color:#FFF; }
.col-mediagroup { display: inline-block; width: 450px; padding: 20px 0 20px 20px; }
[class*='col-'] { padding-right: 20px; } [class*='col-']:last-of-type { padding-right: 20px; padding-left: 0; }
Leigh Kendell
1,490 PointsDo you have a working example somewhere online? When you use inline block there will be spaces between each element before you add any margin or padding, perhaps this is what's causing them to be "off", maybe try floating the columns instead?