Created
November 25, 2012 19:36
-
-
Save diniscorreia/4144939 to your computer and use it in GitHub Desktop.
CSS Grid without inline-block
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
/** | |
* CSS Grid without inline-block | |
*/ | |
ul { | |
margin: 0; | |
padding: 0; | |
list-style: none; | |
width: 420px; | |
} | |
li { | |
float: left; | |
width: 120px; | |
margin: 0 10px; | |
} | |
li:nth-child(3n+1) { | |
clear: left; | |
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
<ul> | |
<li> | |
<img src="http://placekitten.com/120/90"> | |
<p>Text caption</p> | |
</li> | |
<li> <img src="http://placekitten.com/120/90"> | |
<p>A larger than usual text caption on this one</p> | |
</li> | |
<li> <img src="http://placekitten.com/120/90"> | |
<p>Text caption</p> | |
</li> | |
<li> <img src="http://placekitten.com/120/90"> | |
<p>Another larger than usual text caption on this one</p> | |
</li> | |
<li> <img src="http://placekitten.com/120/90"> | |
<p>Text caption</p> | |
</li> | |
<li> <img src="http://placekitten.com/120/90"> | |
<p>Text caption</p> | |
</li> | |
<li> <img src="http://placekitten.com/120/90"> | |
<p>Text caption</p> | |
</li> | |
<li> <img src="http://placekitten.com/120/90"> | |
<p>Text caption</p> | |
</li> | |
<li> <img src="http://placekitten.com/120/90"> <p>Text caption</p> | |
</li> | |
<ul> |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment