Skip to content

Commit 0077e53

Browse files
committed
Aligning Grid Items and Tracks.
1 parent dfc9990 commit 0077e53

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

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

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
/* gap: 30px; */
5353
column-gap: 20px;
5454
row-gap: 40px;
55+
display: none;
5556
}
5657

5758
.el--8 {
@@ -71,18 +72,34 @@
7172
}
7273

7374
.container--2 {
74-
display: none;
75-
7675
/* STARTER */
7776
font-family: sans-serif;
7877
background-color: black;
7978
font-size: 40px;
80-
margin: 100px;
79+
margin: 40px;
8180

82-
width: 1000px;
81+
width: 700px;
8382
height: 600px;
8483

8584
/* CSS GRID */
85+
display: grid;
86+
grid-template-columns: 125px 200px 125px;
87+
grid-template-rows: 250px 100px;
88+
gap: 50px;
89+
90+
/* Aligning tracks inside container: distribute empty space */
91+
justify-content: center;
92+
/* justify-content: space-between; */
93+
align-content: center;
94+
95+
/* Aligning items INSIDE cells: moving items around inside cells */
96+
align-items: end;
97+
justify-items: end;
98+
}
99+
100+
.el--3 {
101+
align-self: center;
102+
justify-self: center;
86103
}
87104
</style>
88105
</head>

0 commit comments

Comments
 (0)