Skip to content

Commit c6b44b1

Browse files
authored
Update style.css
1 parent 74d4726 commit c6b44b1

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

assets/css/style.css

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,51 @@
1-
/* Basic styles for the navigation bar */
1+
/* Basic styling for the navigation bar */
22
.navbar {
3+
position: fixed; /* Make the navbar fixed */
4+
top: 0;
5+
left: 0;
6+
right: 0;
7+
z-index: 1000; /* Ensure it stays above other elements */
38
background-color: #333;
4-
color: #fff;
59
padding: 10px 0;
10+
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Optional shadow for visual separation */
611
}
712

813
.navbar .container {
914
display: flex;
10-
justify-content: space-between;
1115
align-items: center;
16+
justify-content: space-between;
1217
max-width: 1200px;
1318
margin: 0 auto;
1419
padding: 0 20px;
1520
}
1621

22+
/* Logo styling */
1723
.navbar .logo {
1824
font-size: 1.5rem;
1925
color: #fff;
2026
text-decoration: none;
2127
}
2228

29+
/* Navigation links as a row */
2330
.navbar .nav-links {
24-
list-style: none;
2531
display: flex;
2632
gap: 20px;
2733
}
2834

29-
.navbar .nav-links li {
30-
margin: 0;
31-
}
32-
33-
.navbar .nav-links li a {
35+
.navbar .nav-links a {
3436
color: #fff;
3537
text-decoration: none;
3638
font-size: 1rem;
3739
padding: 8px 12px;
3840
transition: background-color 0.3s;
3941
}
4042

41-
.navbar .nav-links li a:hover {
43+
.navbar .nav-links a:hover {
4244
background-color: #555;
4345
border-radius: 4px;
4446
}
47+
48+
/* Add padding to the body to avoid content hiding behind the fixed navbar */
49+
body {
50+
padding-top: 60px; /* Adjust this value based on the navbar height */
51+
}

0 commit comments

Comments
 (0)