Last active
August 26, 2015 19:22
-
-
Save ssirois/dcee61ac0bed9e7eb94e to your computer and use it in GitHub Desktop.
Zen Grids Two Columns Issue
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
<ul> | |
<li>Item 1</li> | |
<li>Item 2</li> | |
<li>Item 3</li> | |
<li>Item 4</li> | |
<li>Item 5</li> | |
<li>Item 6</li> | |
</ul> |
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
// ---- | |
// Sass (v3.4.14) | |
// Compass (v1.0.3) | |
// Zen Grids (v1.4) | |
// ---- | |
@import "zen"; | |
ul { | |
$zen-column-count: 2; | |
$zen-gutter-width: 0px; | |
border: 0.5em solid purple; | |
display: block; | |
width: 70%; | |
@include zen-grid-container; | |
li:nth-child(odd) { | |
@include zen-clear(); | |
@include zen-grid-item(1, 1); | |
} | |
li:nth-child(even) { | |
@include zen-grid-item(1, 2); | |
margin-left: 50%; | |
} | |
} |
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
ul { | |
border: 0.5em solid purple; | |
display: block; | |
width: 70%; | |
} | |
ul:before, ul:after { | |
content: ""; | |
display: table; | |
} | |
ul:after { | |
clear: both; | |
} | |
ul li:nth-child(odd) { | |
clear: left; | |
float: left; | |
width: 100%; | |
margin-left: 0%; | |
margin-right: -100%; | |
padding-left: 10px; | |
padding-right: 10px; | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; | |
word-wrap: break-word; | |
} | |
ul li:nth-child(even) { | |
float: left; | |
width: 100%; | |
margin-left: 100%; | |
margin-right: -200%; | |
padding-left: 10px; | |
padding-right: 10px; | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
box-sizing: border-box; | |
word-wrap: break-word; | |
margin-left: 50%; | |
} |
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
<ul> | |
<li>Item 1</li> | |
<li>Item 2</li> | |
<li>Item 3</li> | |
<li>Item 4</li> | |
<li>Item 5</li> | |
<li>Item 6</li> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment