diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..1910a23 Binary files /dev/null and b/.DS_Store differ diff --git a/css/main.css b/css/main.css index 0b4e001..15e187e 100644 --- a/css/main.css +++ b/css/main.css @@ -310,7 +310,10 @@ main { SECTION (EVENTS / SAVED / INVITATIONS) ========================= */ .events-section { - padding: 2.5rem 0 1rem; + /* Keep content away from the phone edges. + The section also has Bootstrap's .container class, but this rule appears later + and would otherwise overwrite the container's left/right padding with 0. */ + padding: 2.5rem 1rem 1rem; } .events-section h2 { @@ -336,6 +339,7 @@ main { flex-direction: column; gap: 1rem; max-width: 640px; + width: 100%; } /* ========================= @@ -408,6 +412,28 @@ main { margin: 0; } + +/* ========================= + MOBILE SPACING FIX + Prevent cards/text from touching the viewport edges +========================= */ +@media (max-width: 575.98px) { + .events-section { + padding-left: 1rem; + padding-right: 1rem; + } + + .event-card, + .invitation-card { + padding: 1rem; + } + + .invitation-card .d-flex, + .event-card .d-flex { + flex-wrap: wrap; + } +} + /* ========================= TABLET (≥768px) ========================= */ diff --git a/index.html b/index.html index 7d11fd8..a95e5c2 100644 --- a/index.html +++ b/index.html @@ -27,7 +27,7 @@