-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy pathnavbar.html
More file actions
82 lines (72 loc) · 1.47 KB
/
navbar.html
File metadata and controls
82 lines (72 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<nav class="navbar">
<div class="logo">
<a href="index.html">Fintech</a>
</div>
<ul class="nav-links" id="navLinks">
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="login.html">Login</a></li>
<li><a href="signup.html">Signup</a></li>
</ul>
<div class="menu-toggle" onclick="toggleMenu()">☰</div>
</nav>
<style>
/* Navbar Styling */
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
background: #333;
padding: 10px 20px;
}
.navbar .logo a {
color: white;
font-size: 20px;
font-weight: bold;
text-decoration: none;
}
.navbar .nav-links {
list-style: none;
display: flex;
gap: 20px;
}
.navbar .nav-links li a {
color: white;
text-decoration: none;
font-size: 16px;
transition: color 0.3s;
}
.navbar .nav-links li a:hover {
color: #f093fb;
}
/* Mobile Menu */
.menu-toggle {
display: none;
font-size: 24px;
color: white;
cursor: pointer;
}
@media (max-width: 768px) {
.navbar .nav-links {
display: none;
flex-direction: column;
background: #333;
position: absolute;
top: 60px;
right: 20px;
padding: 15px;
border-radius: 5px;
}
.navbar .nav-links.show {
display: flex;
}
.menu-toggle {
display: block;
}
}
</style>
<script>
function toggleMenu() {
document.getElementById("navLinks").classList.toggle("show");
}
</script>