-
Notifications
You must be signed in to change notification settings - Fork 219
/
navbar.css
72 lines (63 loc) · 2.05 KB
/
navbar.css
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
.navbar {
display: flex;
align-items: center;
justify-content: space-between;
background-color: #333;
padding: 10px;
color: white;
}
.navbar div a {
margin-right: 15px;
color: white;
text-decoration: none;
}
.navbar img {
margin-right: 10px;
}
/* Navbar links (visible on large screens) */
#navLinks {
display: flex;
}
#navLinks a {
margin-right: 20px;
}
/* Toggle Button (hidden on large screens) */
#navToggle {
display: none;
}
/* Responsive Media Query for Small Screens */
@media (max-width: 768px) {
/* Hide navbar links */
#navLinks {
display: none;
flex-direction: column;
background-color: #333;
position: absolute;
top: 60px;
left: 0;
right: 0;
padding: 10px;
}
#navLinks a {
margin: 10px 0;
text-align: center;
}
/* Show the toggle button */
#navToggle {
display: block;
background-color: transparent; /* Ensure no background color */
color: white; /* Icon color */
border: none; /* Remove any border */
font-size: 24px; /* Icon size */
cursor: pointer;
width: 40px; /* Fixed width */
height: 40px; /* Fixed height */
text-align: center; /* Horizontally center the icon */
line-height: 40px; /* Vertically center the icon */
border-radius: 5px; /* Optional: Rounded corners */
padding: 0; /* Remove any padding */
margin: 0 auto; /* Center the button horizontally in its container */
position: absolute;
right: 80px;
}
}