Skip to content

Commit df9080d

Browse files
committed
hamburger sidebar menu option on the top instead of middle
1 parent 3ba96c7 commit df9080d

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

Landing Page/index.html

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121
transform: scaleX(1);
2222
}
2323

24-
/* --- CSS FOR MOBILE SIDEBAR (CENTER-ALIGNED) --- */
24+
/* --- CSS FOR MOBILE SIDEBAR (TOP-RIGHT ALIGNED) --- */
2525

2626
@media (max-width: 767px) {
2727
.nav-links {
2828
position: fixed;
2929
top: 0;
30+
/* MODIFICATION 1: Position back to the right edge */
3031
right: 0;
3132
height: 100vh;
3233
width: 75%;
@@ -36,27 +37,30 @@
3637
display: flex;
3738
flex-direction: column;
3839

39-
/* MODIFICATION 1: Align items to the center */
40-
align-items: center;
40+
/* MODIFICATION 2: Align items to the start (left) of the sidebar */
41+
align-items: flex-start;
4142

42-
justify-content: center;
43+
/* MODIFICATION 3: Justify content to the start (top) */
44+
justify-content: flex-start;
4345

44-
/* MODIFICATION 2: Removed right-side padding */
46+
/* MODIFICATION 4: Add padding for spacing */
47+
padding-top: 5rem;
48+
padding-left: 2rem;
4549

50+
/* MODIFICATION 5: Change transform back to horizontal slide */
4651
transform: translateX(100%);
4752
transition: transform 0.3s ease-in-out;
4853
}
4954

5055
#menu-toggle:checked ~ .nav-links {
56+
/* MODIFICATION 6: Show menu by sliding it in from the right */
5157
transform: translateX(0);
5258
}
5359

5460
.nav-links li {
55-
width: 80%; /* Set width for the separator line */
56-
57-
/* MODIFICATION 3: Align text to the center */
58-
text-align: center;
59-
61+
width: 80%;
62+
/* MODIFICATION 7: Align text to the left for readability */
63+
text-align: left;
6064
padding-bottom: 0.75rem;
6165
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
6266
}

0 commit comments

Comments
 (0)