Skip to content

Commit 277676b

Browse files
committed
feat: Center Navbar and Section Elements for Better UI Alignment #25
Signed-off-by: IamLRBA <jerrylarubafestus@gmail.com>
1 parent 124fea6 commit 277676b

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

public/styles/common.css

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ body {
2525

2626
.nav-content {
2727
max-width: 1200px;
28-
margin: 0;
28+
margin: 0 auto;
2929
display: flex;
30-
justify-content: flex-start;
30+
justify-content: center;
3131
align-items: center;
3232
gap: 2rem;
33-
padding-left: 2rem;
33+
padding: 0 2rem;
3434
}
3535

3636
.nav-logo {
@@ -101,7 +101,7 @@ body {
101101
@media (max-width: 768px) {
102102
.nav-content {
103103
flex-direction: column;
104-
align-items: flex-start;
104+
align-items: center;
105105
padding: 0.5rem;
106106
}
107107

@@ -119,7 +119,7 @@ body {
119119
display: none;
120120
width: 100%;
121121
flex-direction: column;
122-
align-items: flex-start;
122+
align-items: center;
123123
padding: 1rem 0;
124124
gap: 1rem;
125125
}
@@ -130,20 +130,27 @@ body {
130130

131131
.dropdown {
132132
width: 100%;
133+
text-align: center;
133134
}
134135

135136
.dropdown-content {
136137
display: none;
137138
position: static;
138139
transform: none;
139140
width: calc(100% - 2rem);
140-
margin: 0.5rem 0 0.5rem 2rem;
141+
margin: 0.5rem auto;
141142
background: rgba(0, 0, 0, 0.4);
143+
text-align: center;
142144
}
143145

144146
.nav-item {
145147
width: 100%;
146148
padding: 0.5rem 1rem;
149+
text-align: center;
150+
}
151+
152+
.dropdown-item {
153+
text-align: center;
147154
}
148155

149156
/* Remove hover behavior on mobile */

public/styles/index.css

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ p {
220220
backdrop-filter: blur(10px);
221221
max-width: 800px;
222222
margin: 0 auto;
223-
text-align: left;
223+
text-align: center;
224224
}
225225

226226
.profile-image-link {
@@ -234,6 +234,7 @@ p {
234234
.profile-section-header {
235235
border-top: 1px solid rgba(255, 255, 255, 0.1);
236236
padding: 1.5rem;
237+
text-align: center;
237238
}
238239

239240
.profile-image-link:focus {
@@ -267,6 +268,11 @@ p {
267268
font-size: 1.3rem;
268269
color: rgba(255, 255, 255, 0.9);
269270
margin-bottom: 1rem;
271+
text-align: center;
272+
}
273+
274+
.links-group h3 {
275+
text-align: center;
270276
}
271277

272278
.links-row {

0 commit comments

Comments
 (0)