@aleksejdix
@aleksejdix
@aleksejdix
@aleksejdix
@aleksejdix
@aleksejdix
@aleksejdix
@aleksejdix
2010
li {
display: inline-block;
width: 100%;
}
@media (min-width: 640px){li {width: 50%}}
@media (min-width: 960px){li {width: calc(100%/3)}}
@media (min-width: 1280px){li {width: 25%}}
/*
<ul class="grid"><li></li><li></li><li></li><li></li><li></li></ul>
*/
.clearfix:after{
content: '';
display: block;
clear: both;
}
li {
float: left;
width: 100%;
}
@media (min-width: 640px){ li { width: 50% }}
@media (min-width: 960px){ li { width: calc(100% / 3)}}
@media (min-width: 1280px){ li { width: 25%}}
/*
<ul class="grid">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
*/
2012
.grid {
display: flex;
flex-wrap: wrap;
}
li {
width: 100%;
}
@media (min-width: 640px){ li { width: 50% }}
@media (min-width: 960px){ li { width: calc(100% / 3)}}
@media (min-width: 1280px){ li { width: 25%}}
/*
<ul class="grid">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
*/
2017
???
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
/*
<ul class="grid">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
*/
@aleksejdix
A network of lines that cross each other to form a series of squares or rectangles.
credits: https://codyhouse.co/web-components
enclosed area with all cells and lines
smallest area between 4 lines
vertical or horizontal area between 2 lines
rectangular area between 4 lines
Designed by Thomas Gaskin. Creative direction by Hugh Dubberly. Algorithms by Patrick Kessler.
Patent belongs to William Drenttel + Jessica Helfand.
DEMO
@aleksejdix
@aleksejdix
learncssgrid.com
css-tricks.com
cssgrid.io
gridbyexample.com
scrimba.com
@aleksejdix
AND MORE IN
WEBZUERI.CH SLACK
LEARNING CHANNEL