From 5c0cac196e8b4bf1e2bc9f4bdb8751d0b888c26c Mon Sep 17 00:00:00 2001 From: Utsavladia Date: Tue, 28 May 2024 21:12:05 +0530 Subject: [PATCH] fixed navbar --- src/App.css | 10 +- src/Components/Navbar/Navbar.css | 250 ++++++++++++++++--------------- 2 files changed, 133 insertions(+), 127 deletions(-) diff --git a/src/App.css b/src/App.css index fcdda97..526bfae 100644 --- a/src/App.css +++ b/src/App.css @@ -28,8 +28,6 @@ color: #61dafb; } - - @keyframes App-logo-spin { from { transform: rotate(0deg); @@ -38,9 +36,11 @@ transform: rotate(360deg); } } -.light_app{ +.light_app { background-color: #282c34; + padding-top: 115px; } -.dark_app{ +.dark_app { background: white; -} \ No newline at end of file + padding-top: 115px; +} diff --git a/src/Components/Navbar/Navbar.css b/src/Components/Navbar/Navbar.css index b014b43..bf6165b 100644 --- a/src/Components/Navbar/Navbar.css +++ b/src/Components/Navbar/Navbar.css @@ -1,144 +1,150 @@ -.navbar{ - display: flex; - justify-content: space-around; - padding: 16px; - box-shadow: 0 1px 3px -2px black; -} -.nav-logo{ - display: flex; - align-items: center; - gap: 10px; +.navbar { + display: flex; + position: fixed; + z-index: 100; + width: 100%; + left: 0; + top: 0; + justify-content: space-around; + padding: 16px; + box-shadow: 0 1px 3px -2px black; + background-color: white; +} +.nav-logo { + display: flex; + align-items: center; + gap: 10px; } .nav-logo-link { - display: flex; - align-items: center; - text-decoration: none; - } -.nav-logo{ - color: #171717; - font-size: 38px; - font-weight: 600; -} -.nav-menu{ - display: flex; - align-items: center; - list-style: none; - gap: 50px; - color: #626262; - font-size: 20px; - font-weight: 500; -} -.nav-menu li{ - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - gap: 3px; - cursor: pointer; -} -.nav-menu li a{text-decoration: none;} -.nav-menu hr{ - border: none; - width: 80%; - height: 3px; - border-radius: 10px; - background: #ff4141; -} -.nav-login-cart{ - display: flex; - align-items: center; - gap:45px; -} -.nav-login-cart .log_btn{ - width: 157px; - height: 58px; - outline: none; - border:1px solid #7a7a7a; - border-radius: 75px; - color: #515151; - font-size: 20px; - font-weight: 500; - background: white; - cursor: pointer; -} -.nav-login-cart .log_btn:active{ - background: #f3f3f3; -} -.nav-cart-count{ - width: 22px; - height: 22px; - display: flex; - justify-content: center; - align-items: center; - margin-top: -35px; - margin-left: -55px; - border-radius: 11px; - font-size: 14px; - background: red; - color: white; -} -.dark_btn{ - width: 50px; - height: 50px; -} -.dark{ - background: linear-gradient(180deg, black, #e1ffea22 90%); -} -.pnav_dark{ - color: #171717; - font-size: 38px; - font-weight: 600; -} -.pnav_light{ - color: white; - font-size: 38px; - font-weight: 600; -} -.cart{ - width: 42px; - height: 42px; -} -button{ - border: none; + display: flex; + align-items: center; + text-decoration: none; +} +.nav-logo { + color: #171717; + font-size: 38px; + font-weight: 600; +} +.nav-menu { + display: flex; + align-items: center; + list-style: none; + gap: 50px; + color: #626262; + font-size: 20px; + font-weight: 500; +} +.nav-menu li { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 3px; + cursor: pointer; +} +.nav-menu li a { + text-decoration: none; +} +.nav-menu hr { + border: none; + width: 80%; + height: 3px; + border-radius: 10px; + background: #ff4141; +} +.nav-login-cart { + display: flex; + align-items: center; + gap: 45px; +} +.nav-login-cart .log_btn { + width: 157px; + height: 58px; + outline: none; + border: 1px solid #7a7a7a; + border-radius: 75px; + color: #515151; + font-size: 20px; + font-weight: 500; + background: white; + cursor: pointer; +} +.nav-login-cart .log_btn:active { + background: #f3f3f3; +} +.nav-cart-count { + width: 22px; + height: 22px; + display: flex; + justify-content: center; + align-items: center; + margin-top: -35px; + margin-left: -55px; + border-radius: 11px; + font-size: 14px; + background: red; + color: white; +} +.dark_btn { + width: 50px; + height: 50px; +} +.dark { + background: linear-gradient(180deg, black, #e1ffea22 90%); +} +.pnav_dark { + color: #171717; + font-size: 38px; + font-weight: 600; +} +.pnav_light { + color: white; + font-size: 38px; + font-weight: 600; +} +.cart { + width: 42px; + height: 42px; +} +button { + border: none; } -.toggle_dark{ - background-color:orange; +.toggle_dark { + background-color: orange; color: white; } -.toggle_light{ - background-color: #515151; - color: white; +.toggle_light { + background-color: #515151; + color: white; } -.change{ +.change { width: 50px; height: 50px; border-radius: 50%; } .toggle_dark { - background-color: rgb(232, 212, 177); - color: white; + background-color: rgb(232, 212, 177); + color: white; } .toggle_light { - background-color: #515151; - color: white; + background-color: #515151; + color: white; } .change { - width: 50px; - height: 50px; - border-radius: 50%; - border: none; - cursor: pointer; - display: flex; - justify-content: center; - align-items: center; + width: 50px; + height: 50px; + border-radius: 50%; + border: none; + cursor: pointer; + display: flex; + justify-content: center; + align-items: center; } .change img { - width: 80%; - height: auto; + width: 80%; + height: auto; } - -