From d18e3c3cbf7de253bd187fbb9b161dbd299c6543 Mon Sep 17 00:00:00 2001 From: chris Date: Tue, 18 Jun 2024 23:26:02 +0800 Subject: [PATCH] Delete the wrapper width setting so that nav and welcome fill the screen --- Week1/Assignment2/mediaqueries.css | 5 +++-- Week1/Assignment2/style.css | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Week1/Assignment2/mediaqueries.css b/Week1/Assignment2/mediaqueries.css index ce25835..90475fd 100644 --- a/Week1/Assignment2/mediaqueries.css +++ b/Week1/Assignment2/mediaqueries.css @@ -1,8 +1,9 @@ -@media screen and (min-width: 800px) and (max-width: 1200px) { +@media screen and (min-width: 1200px) { .grid-container { - max-width: 100%; + margin: 0 auto; } } + @media screen and (min-width: 500px) and (max-width: 800px) { #desktop-nav { display: none; diff --git a/Week1/Assignment2/style.css b/Week1/Assignment2/style.css index 5613522..3d9308f 100644 --- a/Week1/Assignment2/style.css +++ b/Week1/Assignment2/style.css @@ -1,10 +1,10 @@ body { margin: 0; padding: 0; + box-sizing: border-box; } #wrapper { - width: 1200px; max-width: 100%; margin: 0 auto; } @@ -50,10 +50,11 @@ nav { } .grid-container { + max-width: 1200px; display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: 20px; - margin: 0 40px; + margin: 0 20px 20px; } .grid-item {