Last active
May 31, 2025 20:11
-
-
Save Integralist/1213445 to your computer and use it in GitHub Desktop.
Better CSS Grid System #css
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
/* | |
* Algorithm taken from: | |
* http://csswizardry.com/2011/08/building-better-grid-systems/ | |
*/ | |
.row { | |
width: (number of columns * width of one column) + (number of columns * width of one gutter) px; | |
margin-left: -width of one gutter px; | |
overflow: hidden; | |
clear: both; | |
} | |
.grid { | |
float: left; | |
margin-left: width of one gutter px; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment