Skip to content

Commit 4b8a6f4

Browse files
14 - Grid Template Areas Finished
1 parent f91f1b5 commit 4b8a6f4

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

14 - Grid Template Areas/area-line-names-START.html

+10-1
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,17 @@
4646
.container {
4747
display: grid;
4848
grid-gap: 20px;
49+
grid-template-areas:
50+
"💩 💩 💩 💩 🍔 🍔 🍔 🍔"
51+
"💩 💩 💩 💩 🍔 🍔 🍔 🍔"
52+
"💩 💩 💩 💩 🍔 🍔 🍔 🍔"
53+
"💩 💩 💩 💩 🍔 🍔 🍔 🍔";
54+
}
55+
56+
.item3 {
57+
grid-column: 💩-start / 💩-end;
4958
}
5059
</style>
5160
</body>
5261

53-
</html>
62+
</html>

14 - Grid Template Areas/areas-START.html

+32-1
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,39 @@
2929
.container {
3030
display: grid;
3131
grid-gap: 20px;
32+
grid-template-columns: 1fr 10fr 1fr;
33+
grid-template-rows: 150px 150px 100px;
34+
grid-template-areas:
35+
"sidebar-1 content sidebar-2"
36+
"sidebar-1 content sidebar-2"
37+
"footer footer footer";
38+
}
39+
40+
.footer {
41+
grid-area: footer;
42+
}
43+
44+
.item1 {
45+
grid-area: sidebar-1;
46+
}
47+
48+
.item2 {
49+
grid-area: content;
50+
}
51+
52+
.item3 {
53+
grid-area: sidebar-2;
54+
}
55+
56+
@media (max-width: 700px) {
57+
.container {
58+
grid-template-areas:
59+
"content content content"
60+
"sidebar-1 sidebar-1 sidebar-2"
61+
"footer footer footer";
62+
}
3263
}
3364
</style>
3465
</body>
3566

36-
</html>
67+
</html>

0 commit comments

Comments
 (0)