Skip to content

Instantly share code, notes, and snippets.

@data-enhanced
Created January 1, 2014 23:03
Show Gist options
  • Save data-enhanced/8212523 to your computer and use it in GitHub Desktop.
Save data-enhanced/8212523 to your computer and use it in GitHub Desktop.
Create a grid of product items using display: inline-table
.products-grid {
display: table;
}
.product-item {
float: none; // override default grid floating behavior
display: inline-table;
margin-right: -1em; // http://www.tylercipriani.com/2012/08/01/display-inline-block-extra-margin.html
vertical-align: top; // Safari defaults to vertical-align center
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment