Skip to content

Commit f24c023

Browse files
committed
grid columns and rows
1 parent 1014f17 commit f24c023

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

practice/04 - CSS Layouts/css-grid.html

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
.el--3 {
1717
background-color: green;
18-
/*height: 150px;*/
18+
height: 150px;
1919
}
2020

2121
.el--4 {
@@ -50,12 +50,27 @@
5050
/*grid-template-columns: 1fr 1fr 1fr auto;*/
5151
grid-template-columns: repeat(4, 1fr);
5252
/*grid-template-rows: 300px 200px;*/
53-
grid-template-rows: 1fr auto;
53+
grid-template-rows: 1fr 1fr;
5454

5555
/*gap: 10px;*/
56-
column-gap: 10px;
57-
row-gap: 20px;
58-
height: 500px;
56+
column-gap: 20px;
57+
row-gap: 30px;
58+
}
59+
60+
.el--8 {
61+
grid-column: 2 / 3;
62+
grid-row: 1;
63+
}
64+
65+
.el--2 {
66+
/*grid-column: 1 / 4;*/
67+
/*grid-column: 1 / span 4;*/
68+
grid-column: 1 / -1; /* span all the way to end */
69+
grid-row: 2;
70+
}
71+
72+
.el--6 {
73+
grid-row: 3 / 6;
5974
}
6075

6176
.container--2 {
@@ -82,7 +97,7 @@
8297
<div class="el el--4">(4) are</div>
8398
<div class="el el--5">(5) amazing</div>
8499
<div class="el el--6">(6) languages</div>
85-
<div class="el el--7">(7) to</div>
100+
<!-- <div class="el el&#45;&#45;7">(7) to</div>-->
86101
<div class="el el--8">(8) learn</div>
87102
</div>
88103

0 commit comments

Comments
 (0)