Skip to content

Instantly share code, notes, and snippets.

@beshur
Created March 4, 2013 10:01
Show Gist options
  • Save beshur/5081201 to your computer and use it in GitHub Desktop.
Save beshur/5081201 to your computer and use it in GitHub Desktop.
CSS misc stuff
/* misc useful stuff
Alex Buznik (http://buznik.com/) */
.b_catalog {
position: relative;
font: 0/0 a;
}
.b_catalog__el {
position: relative;
display: inline-block;
width: 30.6%; /* for data-item-count='3' */
margin: 0 0 30px 4%;
vertical-align: top;
font-size: 100%;
border-bottom: 3px solid transparent;
background: #fff;
}
.b_catalog__el.c_l {
margin-left: 0;
}
.b_catalog[data-item-count='1'] .b_catalog__el {
width: 100%;
}
.b_catalog[data-item-count='2'] .b_catalog__el {
width: 48%;
}
.b_catalog[data-item-count='4'] .b_catalog__el {
width: 22%;
}
.b_catalog[data-item-count='5'] .b_catalog__el {
width: 16.8%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment