From b2e14f1d7eeb1c9b5651135a714465e41c0f8ec7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 16 Jan 2024 14:03:41 +0530 Subject: [PATCH] changed nav --- SOURCE/menu.svg | 10 ++-- css/style.css | 141 ++++++++++++++++++++++-------------------------- index.html | 16 ++++++ js/script.js | 4 +- 4 files changed, 89 insertions(+), 82 deletions(-) diff --git a/SOURCE/menu.svg b/SOURCE/menu.svg index 721c69e..0386391 100644 --- a/SOURCE/menu.svg +++ b/SOURCE/menu.svg @@ -1,4 +1,8 @@ - - - + + + + + + + diff --git a/css/style.css b/css/style.css index 01375ef..80010e8 100644 --- a/css/style.css +++ b/css/style.css @@ -74,6 +74,7 @@ nav ul li a:hover:after{ } .main-body-1{ + position: relative; overflow-x: hidden; height: 88vh; background: url('../SOURCE/home-bg.png'); @@ -104,6 +105,8 @@ nav ul li a:hover:after{ font-size: xxx-large; } + + .width_dec{ margin-left: 3rem; display: flex; @@ -116,21 +119,20 @@ ul.nav-t{ } .explr-btn { - width: 115px; - transition: all 0.5s ease; - padding: 10px 10px; - outline: none; - margin: 25px 0; - justify-content: left; - height: 44px; - font-weight: 500; - font-size: medium; - display: flex; - color: #fff; - border: 1px solid rgb(52, 52, 208); - border-radius: 8px; background-color: rgb(37, 132, 255); - align-items: center; + border-radius: 8px; + border: none; + color: #fff; + display: flex; + font-size: medium; + font-weight: 500; + height: 2.5rem; + justify-content: left; + margin: 25px 0; + outline: none; + padding: 10px 10px; + transition: all 0.5s ease; + width: 8rem; } @@ -146,73 +148,65 @@ ul.nav-t{ .handBurger{ display: none; - transition: all 1.5s ease; + cursor: pointer; } .nav_a{ height: 61px; } +.mobile_menu_container{ + height: 50vh; + position: absolute; + top: 1px; + right: 3px; + width: 300px; + display: flex; + justify-content: flex-end; + /* transform: translateY(-100%); */ + transition: ease-out 1s; + overflow: hidden; + z-index: 9; + display: none; -@media screen and (max-width: 675px){ - ul .li{ - height: 10vh; - } - - .font-six{ - font-size: larger; - font-weight: 600; - } - .handBurger{ - width: 100px; - display: flex; - align-items: center; - justify-content: center; - - } - - .menu_icon{ - height: 2.5rem; - width: 100%; - cursor: pointer; - } +} +.mobile_menu{ + background-color: rgb(19, 14, 14); + padding: 5px; + height: 100%; + width: 100%; + border-radius: 5px; +} - - ul.nav-t{ - height: 90vh; - width: 100%; - position: absolute; - left: -100%; - flex-direction: column; - top: 10vh; - align-items: center; - background-color: #141313; - display: flex; - transition: all 0.5s ease; - } +.li_mobile{ + display: flex; + justify-content: space-between; + align-items: center; + color: black; + padding: 10px; + height: 50px; + border-bottom:1px dashed rgb(194, 190, 190, 0.5) ; +} - ul.nav-t_open{ - height: 90vh; - width: 100%; - left: 0%; - position: absolute; - flex-direction: column; - top: 10vh; - justify-content: flex-start; - align-items: center; - background-color: #141313; - display: flex; - } +.li_mobile a,.li_mobile p{ + color: #fff; +} - ul.nav-t li{ - display: flex; - justify-content: center; - align-items: center; - width: 100%; - margin: 8vh 0; - padding: 10px 0; - } +@media screen and (max-width: 675px){ + .handBurger{ + display: flex; + margin-right: 1rem; + } + .hide{ + display: none; + } + .nav-t{ + display: none; + } + .unhide{ + display: flex; + } } #main-body-2{ @@ -337,10 +331,3 @@ h3{ } - - -@media screen and (min-height: 600px){ - ul.nav-t { - display: flex; - } -} \ No newline at end of file diff --git a/index.html b/index.html index 57fcdf2..17409b2 100644 --- a/index.html +++ b/index.html @@ -30,6 +30,22 @@
+
+
+
+ Home +

>

+
+
+ CSE-D +

>

+
+
+ TG-TOBI +

>

+
+
+

Web Dev

Hey! My name is Tobi

diff --git a/js/script.js b/js/script.js index c286f3c..e473ffb 100644 --- a/js/script.js +++ b/js/script.js @@ -1,8 +1,8 @@ const navTElement = document.querySelector(".menu_icon"); -const flexContainer = document.querySelector(".nav-t"); +const flexContainer = document.querySelector(".hide"); const listItem = document.querySelectorAll(".li"); navTElement.addEventListener("click", () => { - flexContainer.classList.toggle("nav-t_open"); + flexContainer.classList.toggle("unhide"); }); listItem.forEach((liItem) => { liItem.addEventListener("click", () => {