Skip to content

Commit fac8fad

Browse files
Merge pull request #243 from HammadKhaan/fix/header-ui-on-small-screen
Header UI fixed on screen width greater than 640px and less than 900px
2 parents 319d770 + 68ab3a5 commit fac8fad

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

components/navbar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const Navbar = () => {
1515
};
1616
const displayMenu = () => {
1717
if (isMenuOpen) {
18-
return "flex sm:hidden flex-col justify-center items-center gap-2 my-2";
18+
return "flex small-screen-header flex-col justify-center items-center gap-2 my-2";
1919
} else {
2020
return "hidden";
2121
}
@@ -45,7 +45,7 @@ const Navbar = () => {
4545
<div role="button" className="nav_links">FAQs</div>
4646
</Link>
4747
</div>
48-
<div className="flex sm:hidden hamburger" onClick={showMenu}>
48+
<div className="hamburger" onClick={showMenu}>
4949
<p>{isMenuOpen ? <AiOutlineClose /> : <MdMenu />}</p>
5050
</div>
5151
</nav>

styles/components/navbar_style.css

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,13 @@ nav {
4545
background-color: rgba(118, 14, 216, 0.501);
4646
border-radius: 40px;
4747
}
48-
@media (max-width: 640px) {
48+
@media (max-width: 899px) {
4949
.right_contents {
5050
display: none;
5151
}
5252
}
5353

54-
@media (max-width: 900px) {
54+
@media (max-width: 899px) {
5555
.nav_links {
5656
padding: 12px;
5757
/* margin-bottom: 24px; */
@@ -70,9 +70,21 @@ nav {
7070
}
7171
}
7272

73-
@media (max-width: 900px) {
73+
@media (max-width: 899px) {
7474
.nav_container nav div {
7575
flex-direction: column;
7676
gap: 8px;
7777
}
7878
}
79+
80+
@media (min-width: 899px) {
81+
.hamburger {
82+
display: none;
83+
}
84+
}
85+
86+
@media (min-width: 899px) {
87+
.small-screen-header {
88+
display: none;
89+
}
90+
}

0 commit comments

Comments
 (0)