I'm pretty new to Zen Grids, so I'm not sure if it is meant for this situation (content, not layout).
So I have a view of user profiles inside the main #content div. In my largest layout, I'm using zen-grid-item() to generate three columns of user profiles, so the user profiles are stacked in rows of three.
I borrowed the SASS/CSS from the .two-sidbars section in _responsive.scss. My code looks like this:
@media all and (min-width: 960px) {
$zen-column-count: 3;
.user-profile-teaser {
@include zen-grid-item-base();
}
.user-profile-teaser:nth-child(3n+1) {
@include zen-grid-item(1, 1);
@include zen-clear();
}
.user-profile-teaser:nth-child(3n+2) {
@include zen-grid-item(1, 2);
}
.user-profile-teaser:nth-child(3n) {
@include zen-grid-item(1, 3);
}
}The problem I run into is zen-grid-item() adds L/R gutters to every item. This means the content is indented on the left and right sides, and so it doesn't line up w/ the content above/below.
Is there a way to tell zen-grid-item() to have no gutter on the left edge of the first child items, and no gutter on the right edge of the third child items? I still want the default gutters between the first and second child items, as well as the second and third child items. Or is Zen Grids not really meant for building grids of content like this?
Comments
Comment #1
classicridge commentedI'd like to know the real answer to this too. There's probably a better way to do this, but I was able to address a similar problem by overriding the padding, by adding my own CSS rules like so:
Comment #2
johnalbinYou need to add a wrapper around the items and use one of Zen Grids container mixins on the wrapper.