Skip to content

Commit 782cf2f

Browse files
committed
Fix mobile responsiveness issues
1 parent 1360b6d commit 782cf2f

3 files changed

Lines changed: 76 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Visit the live site at: [https://jebalert.github.io/pi-tribute/](https://jebaler
2626

2727
1. Clone the repository:
2828
```bash
29-
git clone https://github.com/jbenfante/pi-tribute.git
29+
git clone https://github.com/jebalert/pi-tribute.git
3030
cd pi-tribute
3131
```
3232

‎src/App.css‎

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#root {
2+
width: 100%;
23
max-width: 1280px;
34
margin: 0 auto;
4-
padding: 2rem;
5+
padding: 1rem;
56
text-align: center;
7+
box-sizing: border-box;
68
}
79

810
.logo {
@@ -34,9 +36,45 @@
3436
}
3537

3638
.card {
37-
padding: 2em;
39+
padding: 1em;
3840
}
3941

4042
.read-the-docs {
4143
color: #888;
4244
}
45+
46+
/* Mobile Responsive Styles */
47+
@media screen and (max-width: 768px) {
48+
#root {
49+
padding: 0.5rem;
50+
}
51+
52+
.card {
53+
padding: 0.5em;
54+
}
55+
56+
h1 {
57+
font-size: 2em;
58+
}
59+
60+
.logo {
61+
height: 4em;
62+
padding: 1em;
63+
}
64+
}
65+
66+
/* Small Mobile Devices */
67+
@media screen and (max-width: 480px) {
68+
#root {
69+
padding: 0.25rem;
70+
}
71+
72+
h1 {
73+
font-size: 1.5em;
74+
}
75+
76+
.logo {
77+
height: 3em;
78+
padding: 0.75em;
79+
}
80+
}

‎src/index.css‎

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ a:hover {
2424

2525
body {
2626
margin: 0;
27-
display: flex;
28-
place-items: center;
2927
min-width: 320px;
3028
min-height: 100vh;
29+
width: 100%;
30+
overflow-x: hidden;
3131
}
3232

3333
h1 {
3434
font-size: 3.2em;
3535
line-height: 1.1;
36+
margin: 0.5em 0;
3637
}
3738

3839
button {
@@ -66,3 +67,35 @@ button:focus-visible {
6667
background-color: #f9f9f9;
6768
}
6869
}
70+
71+
/* Mobile Responsive Styles */
72+
@media screen and (max-width: 768px) {
73+
body {
74+
font-size: 14px;
75+
}
76+
77+
h1 {
78+
font-size: 2.5em;
79+
}
80+
81+
button {
82+
padding: 0.5em 1em;
83+
font-size: 0.9em;
84+
}
85+
}
86+
87+
/* Small Mobile Devices */
88+
@media screen and (max-width: 480px) {
89+
body {
90+
font-size: 12px;
91+
}
92+
93+
h1 {
94+
font-size: 2em;
95+
}
96+
97+
button {
98+
padding: 0.4em 0.8em;
99+
font-size: 0.8em;
100+
}
101+
}

0 commit comments

Comments
 (0)