From 7e4f721b081d6cceb6bb0108580f62d72c691062 Mon Sep 17 00:00:00 2001 From: Kumar Anshuman Date: Sat, 10 Aug 2024 19:26:45 +0530 Subject: [PATCH] i fixed the nav bar where dark mode icon and profile icon is overlapping the navbar items --- assets/css/style.css | 5 ++++- index.html | 23 +++++++++++++---------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/assets/css/style.css b/assets/css/style.css index 409242a6..50ea3289 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -3185,7 +3185,7 @@ footer { /* Switch Label */ .switch-label { - position: relative; + position: relative; /* Or absolute if needed */ width: 45px; height: 30px; background-color: #ccc; @@ -3197,8 +3197,11 @@ footer { padding: 0 5px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); transition: background-color 0.5s ease; + left: 250px; /* Adjust to move it to the right */ } + + .switch-label .sun-icon, .switch-label .moon-icon { font-size: 19px; diff --git a/index.html b/index.html index a06ac149..1a16c77c 100644 --- a/index.html +++ b/index.html @@ -75,15 +75,17 @@ .nav { - display: flex; - align-items: center; - justify-content: space-between; - padding: 20px; - } + display: flex; + align-items: center; + justify-content: space-between; + padding: 20px; + margin-left: -47px; /* Increased negative margin to move content more to the left */ +} + .action { position: absolute; - right: 600px; + left: 1440px; top: 15px; } @@ -676,15 +678,16 @@ /* Basic navbar styling */ -.header { + .header { position: fixed; width: 100%; - top: 10; + top: 10px; /* Assuming you meant 10px for the top */ z-index: 1000; - transition: top 0.3s; - transition: transform 0.3s ease; + transition: top 0.3s, transform 0.3s ease; + margin-left: 10px; /* Add a negative margin to shift left */ } + /* Hide the navbar */ .header.hidden { top: -93px; /* Adjust according to your header height */