Skip to content

Commit

Permalink
Merge pull request #168 from NishantRana07/NavBar
Browse files Browse the repository at this point in the history
Nav bar Fixed
  • Loading branch information
tushargupta1504 authored Oct 4, 2024
2 parents 449aaaa + cc34a85 commit 5dbc5fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 56 deletions.
Binary file added img/swasthya-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<input type="checkbox" name="" id="toggler">
<label for="toggler" class="fas fa-bars"></label>
<a href="#" class="logo">Swasthya<span>.</span></a>
<a href="#" class="logo"><img src="img/swasthya-logo.png"></a>

<nav class="navbar">

Expand Down
67 changes: 12 additions & 55 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -56,77 +56,34 @@ section{
header{
position: fixed;
top: 0; left: 0; right: 0;

width: 100%;
background: rgba(243, 239, 239, 0.8);
padding: 2rem 9%;
padding: 1rem;
display: flex;
align-items: center;
justify-content: space-between;

z-index: 1100;
box-shadow: 0.5rem 1rem rgba(0,0,0,0.1);
}

header .logo{
font-size: 3rem;
color: #333;
font-weight: bolder;
}
header.logo{
position: relative;
font-weight: 700;
color: #fff;
text-decoration: none;
font-size: 2rem;
text-transform: uppercase;
letter-spacing: 2px;
transition: 0.6s;
}

header ul{
position: relative;
display: flex;
justify-content: center;
/* align-items: center; */
.logo
{
height:50px;
margin-left:20px;
}
header ul li{
position: relative;
List-style: none;
}

header ul li a{
position: relative;
margin: 0 15px;
text-decoration: none;
color: #666;
letter-spacing: 2px;
transition: 0.6s;
font-weight: 500px;
}
header .sticky ul li a{
color: #666;
}
header .logo span{
color: var(--blue);
}

header .navbar {
display: flex;
color: #333;
gap: 2rem; /* Adds space between the links */
.logo img
{
width: 100%;
height: 100%;
border:none;
}

header .navbar a{
font-size: 2rem;
padding: 0 1.5rem;
color: #282727;
}

.navbar a {
color: black;
text-decoration: none;
padding: 10px 15px;
padding: 5px 18px;
font-size: 1.6rem;
transition: color 0.3s ease, background-color 0.3s ease;
}

Expand Down

0 comments on commit 5dbc5fa

Please sign in to comment.