Skip to content

Commit 4b8a61e

Browse files
committed
Added several refactorings for even cleaner code accomplishing same results.
1 parent e328f73 commit 4b8a61e

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

starter/04-CSS-Layouts/style.css

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ body {
2626
padding-left: 40px;
2727
padding-right: 40px; */
2828
padding: 20px 40px;
29-
margin-bottom: 60px;
29+
/* margin-bottom: 60px; */
3030
/* height: 80px; */
3131
}
3232

@@ -36,7 +36,7 @@ nav {
3636
}
3737

3838
article {
39-
margin-bottom: 60px;
39+
/* margin-bottom: 60px; */
4040
}
4141

4242
.post-header {
@@ -333,21 +333,23 @@ nav p {
333333
/* CSS GRID APPROACH */
334334
.container {
335335
display: grid;
336-
/* grid-template-rows: 1fr 1fr 1fr; */
337-
grid-template-columns: 825fr 300fr;
338-
row-gap: 25px;
336+
/* NO GRID TEMPLATE ROWS
337+
we just allow css grid to auto adjust row heights according to their content */
338+
grid-template-columns: 1fr 300px;
339+
row-gap: 60px;
339340
column-gap: 75px;
341+
align-items: start;
340342
}
341343

342344
.main-header {
343345
grid-column: 1 / -1;
344-
grid-row: 1 / 2;
346+
margin-bottom: 0;
345347
}
346348

347349
.copyright {
348350
grid-column: 1 / -1;
349351
}
350352

351353
.related-posts {
352-
align-self: start;
354+
/* align-self: start; */
353355
}

0 commit comments

Comments
 (0)