Last active
August 29, 2015 13:56
-
-
Save krambuhl/8855883 to your computer and use it in GitHub Desktop.
A general layout module for creating columns.
This file contains hidden or 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
.slice { | |
display: table; | |
table-layout: fixed; // makes items equal sizes automatically | |
width: 100%; | |
} | |
.slice-auto { | |
table-layout: auto; // items will resize based on content size | |
} | |
.slice-item { | |
display: table-cell; | |
vertical-align: top; | |
width: 100%; | |
} | |
// returning tables/cells to divs will stack items | |
@media only screen and (max-width: 640px) { | |
.slice, | |
.slice-item { | |
display: block !important; | |
width: 100% !important; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment