Beta
Codophile is currently in active development. Features may change rapidly! 🚀
Codophile
K
Playground
Templates
Effects
Docs
About
Get Started
Back to CSS
CSS Grid Layout
Master grid layouts by controlling grid templates, gaps, and item placement.
Container
Items
Grid Template
Columns
repeat(3, 1fr)
1fr 2fr 1fr
repeat(auto-fit, minmax(100px, 1fr))
100px 100px
Rows
repeat(3, 100px)
auto auto
100px 200px
Gap
10px
Items Alignment (Inside Grid Area)
Justify Items (Horizontal)
start
end
center
stretch
Align Items (Vertical)
start
end
center
stretch
Content Alignment (Whole Grid)
Justify Content (Horizontal)
start
end
center
stretch
space-around
space-between
space-evenly
Align Content (Vertical)
start
end
center
stretch
space-around
space-between
space-evenly
+
Add Box
-
Remove Box
Reset All
Grid Container Preview
6 Items
1
2
3
4
5
6
Container CSS
Copy CSS
.container
{
display:
grid
;
grid-template-columns:
repeat(3, 1fr)
;
grid-template-rows:
repeat(3, 100px)
;
gap:
10px
;
justify-items:
stretch
;
align-items:
stretch
;
justify-content:
start
;
align-content:
start
;
}