Skip to content

Instantly share code, notes, and snippets.

@R3V1Z3
Created September 4, 2013 10:33
Show Gist options
  • Save R3V1Z3/6435326 to your computer and use it in GitHub Desktop.
Save R3V1Z3/6435326 to your computer and use it in GitHub Desktop.
CSS for the MarketPress e-Commerce plugin for WordPress to display products in a 3-column grid format.
div#mp_product_list .product {
display: inline;
float: left;
width: 29%;
margin: 2%;
}
div#mp_product_list .product:nth-child(3n+1) {
clear: both;
}
@media all and (max-width: 800px) {
div#mp_product_list .product {
width: 46%;
margin: 2%;
}
div#mp_product_list .product:nth-child(3n+1) {
clear: none;
}
div#mp_product_list .product:nth-child(2n+1) {
clear: both;
}
}
@media all and (max-width: 500px) {
div#mp_product_list .product {
width: 100%;
margin: 0;
}
}
div#mp_product_list .product img.alignleft, .entry-content .wp-caption.alignleft {
margin-left: 0px; /* image alignment adjustment for Twenty-Thirteen theme */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment