File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change 4242 /* CSS GRID */
4343 display : grid;
4444
45- /* * 4 columns */
46- grid-template-columns : 250px 250px 150px 150px ;
45+ /* Make all items have width proportions as follows */
46+ /* grid-template-columns: 2fr 2fr 1fr auto; */
47+
48+ /* Create 4 columns, each have the same width "1fr" */
49+ grid-template-columns : repeat (4 , 1fr );
50+
4751 /* * 2 rows */
48- grid-template-rows : 300px 200px ;
52+ /* grid-template-rows: 300px 200px; */
53+
54+ /* Create 2 rows,
55+ both rows have height "1fr",
56+ which is equal to 150px (inherited from element ".el--3" which is the tallest element)
57+ */
58+ grid-template-rows : 1fr 1fr ;
59+
60+ /* Create 2 rows,
61+ 1) second row have heght "auto",
62+ whcih is only take the space it need for its content.
63+ 2) first row will the leftover height "1fr",
64+ which will filled the entire container.
65+ */
66+ grid-template-rows : 1fr auto;
4967
5068 gap : 20px ;
5169 column-gap : 30px ;
5270 row-gap : 60px ;
71+ height : 500px ;
5372 }
5473
5574 .container--2 {
You can’t perform that action at this time.
0 commit comments