Skip to content

Commit 9f1aa6b

Browse files
authored
Added scrollbar for menu && fixed overlapping issue
1 parent 362bc03 commit 9f1aa6b

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

style.css

+27-2
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,32 @@ body {
948948
transition: all 0.6s;
949949
transform: translateX(100%);
950950
opacity: 0;
951+
overflow-y: auto; /* Allow vertical scrolling only */
952+
overflow-x: hidden; /* Hide horizontal overflow */
951953
}
952954

955+
/* -----------Scrollbar for menu---------------- */
956+
/* For WebKit browsers (Chrome, Safari) */
957+
.menuCont .optCont::-webkit-scrollbar {
958+
width: 2px; /* Width of the scrollbar */
959+
}
960+
/* Track */
961+
.menuCont .optCont::-webkit-scrollbar-track {
962+
background: transparent; /* Background of the track */
963+
}
964+
/* Handle */
965+
.menuCont .optCont::-webkit-scrollbar-thumb {
966+
background: var(--darkColor-blue); /* Color of the scrollbar handle */
967+
border-radius: 2px; /* Rounded corners for the scrollbar handle */
968+
}
969+
/* For Firefox */
970+
.menuCont .optCont {
971+
scrollbar-width: thin; /* Makes the scrollbar thin */
972+
scrollbar-color: var(--darkColor-blue) transparent; /* Handle color and track color */
973+
}
974+
/* -------------End of Scrollbar for menu-------------- */
975+
976+
953977
.menuBar .optCont .tilesCont {
954978
width: 100%;
955979
height: 50px;
@@ -1225,7 +1249,7 @@ input:checked+.toggle:before {
12251249

12261250
/* ---------------------- */
12271251
#menuCloseButton {
1228-
position: absolute;
1252+
/* position: absolute; */
12291253
bottom: var(--gap);
12301254
width: 42px;
12311255
max-width: 100%; /* Set max-width to fit-content initially */
@@ -1241,6 +1265,7 @@ input:checked+.toggle:before {
12411265
overflow: hidden; /* Hide the overflow when content expands */
12421266
transition: all 0.4s; /* Transition the max-width property */
12431267
cursor: pointer;
1268+
margin-top: 69px;
12441269
}
12451270

12461271
#menuCloseButton:hover{
@@ -1265,4 +1290,4 @@ input:checked+.toggle:before {
12651290
#menuCloseButton .icon:hover{
12661291
transition: all 0.2s;
12671292
transform: rotate(90deg);
1268-
}
1293+
}

0 commit comments

Comments
 (0)