Skip to content

Commit

Permalink
updating on a navbar and footer
Browse files Browse the repository at this point in the history
  • Loading branch information
GauravPant47 committed Jan 21, 2024
1 parent c5c55de commit a7cc2e3
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
2 changes: 2 additions & 0 deletions navbar and footer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

<link rel="stylesheet" href="styles.css">
<title>Responsive Navbar and Footer</title>
</head>
Expand Down
35 changes: 32 additions & 3 deletions navbar and footer/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,27 @@
display: none;
flex-direction: column;
cursor: pointer;

}

.menu-toggle span {
height: 3px;
width: 25px;
background-color: white;
margin: 3px 0;
transition: transform 0.3s ease-in-out;
}

.menu-toggle.active span:nth-child(1) {
transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
transform: rotate(45deg) translate(-5px, -6px);
}

/* Footer styles */
Expand All @@ -59,17 +73,32 @@ footer {

/* Responsive design */
@media (max-width: 768px) {
.logo {
font-size: 20px;
}

.nav-links {
display: none;
flex-direction: column;
background-color: #333;
width: 100%;
padding: 0px 0px 17px 40px;
width: 22%;
position: absolute;
top: 70px;
left: 0;
top: 65px;
right: 0;
z-index: 1;
}

.nav-links li {
margin: 10px;
padding: 10px;
}

.nav-links a {
color: white;
text-decoration: none;
}

.nav-links.active {
display: flex;
}
Expand Down

0 comments on commit a7cc2e3

Please sign in to comment.