Skip to content

Commit c0b9e54

Browse files
committed
feat: aligning grid items and tracks
1 parent 5b08fd5 commit c0b9e54

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
row-gap: 40px;
7171
/* Set the proper container height */
7272
/* height: 500px; */
73+
display: none;
7374
}
7475

7576
.el--8 {
@@ -97,7 +98,6 @@
9798
}
9899

99100
.container--2 {
100-
display: none;
101101
/* STARTER */
102102
font-family: sans-serif;
103103
background-color: black;
@@ -108,6 +108,24 @@
108108
height: 600px;
109109

110110
/* CSS GRID */
111+
display: grid;
112+
grid-template-columns: 125px 200px 125px;
113+
grid-template-rows: 250px 100px;
114+
gap: 50px;
115+
/* Aligning tracks inside container */
116+
justify-content: center;
117+
/* justify-content: space-between; */
118+
align-content: center;
119+
120+
/* Aligning items inside grid cells */
121+
align-items: center;
122+
justify-items: center;
123+
}
124+
125+
/* Override align-tem and justify-items properties from parent's container */
126+
.el--3 {
127+
align-self: end;
128+
justify-self: end;
111129
}
112130
</style>
113131
</head>

0 commit comments

Comments
 (0)