Created
January 1, 2014 23:03
-
-
Save data-enhanced/8212523 to your computer and use it in GitHub Desktop.
Create a grid of product items using display: inline-table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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