Skip to content

Commit f03de06

Browse files
authored
Update nav.css
1 parent 56bdb26 commit f03de06

File tree

1 file changed

+38
-122
lines changed

1 file changed

+38
-122
lines changed

assets/css/nav.css

Lines changed: 38 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,143 +1,52 @@
1-
/* Add a black background color to the top navigation */
1+
/* Fixed navigation bar at the top */
22
.topnav {
33
background-color: #13294B;
44
overflow: hidden;
5-
position:fixed;
6-
z-index:999;
7-
width:100%;
8-
}
9-
10-
11-
.topnav #myLinks {
12-
display: inline;
13-
}
14-
15-
.topnav a.icon {
16-
display: none;
5+
position: fixed;
6+
z-index: 999;
7+
width: 100%;
8+
top: 0; /* Aligns the nav to the very top */
9+
margin: 0; /* Removes any margin */
10+
padding: 0; /* Removes any padding */
1711
}
1812

19-
.topnav img {
20-
margin-bottom:0pt;
21-
margin-top:10pt;
22-
margin-left:30%;
23-
}
24-
25-
/* Style the links inside the navigation bar */
26-
.topnav a.normal {
13+
/* Links inside the navigation bar */
14+
.topnav a.normal {
2715
float: right;
2816
color: #f2f2f2;
2917
text-align: center;
3018
padding: 10px 9px;
3119
text-decoration: none;
3220
font-size: 17px;
33-
}
34-
35-
/* Change the color of links on hover */
36-
.topnav a.normal:hover {
21+
}
22+
23+
/* Hover effects for links */
24+
.topnav a.normal:hover {
3725
background-color: #ddd;
3826
color: black;
39-
}
40-
41-
/* Add a color to the active/current link */
42-
.topnav a.right {
43-
margin-right:30%;
44-
}
45-
46-
@media print, screen and (max-width: 1000px) {
47-
48-
.topnav img {
49-
margin-left:3%;
50-
}
51-
52-
.topnav a.right {
53-
margin-right:3%;
54-
}
55-
56-
.topnav a.normal {
57-
padding: 10px 5px;
58-
}
59-
60-
}
61-
62-
@media print, screen and (max-width: 1200px) and (min-width: 1001px) {
63-
64-
.topnav img {
65-
margin-left:6%;
66-
}
67-
.topnav a.right {
68-
margin-right:6%;
69-
}
70-
71-
}
72-
73-
@media print, screen and (max-width: 1400px) and (min-width: 1201px) {
74-
75-
.topnav img {
76-
margin-left:12%;
77-
}
78-
.topnav a.right {
79-
margin-right:12%;
80-
}
81-
82-
}
83-
84-
85-
@media print, screen and (max-width: 1600px) and (min-width: 1401px) {
86-
87-
.topnav img {
88-
margin-left:16%;
89-
}
90-
.topnav a.right {
91-
margin-right:16%;
92-
}
93-
94-
}
95-
96-
@media print, screen and (max-width: 1800px) and (min-width: 1601px) {
97-
98-
.topnav img {
99-
margin-left:19%;
100-
}
101-
.topnav a.right {
102-
margin-right:19%;
103-
}
104-
105-
}
106-
107-
@media print, screen and (max-width: 2000px) and (min-width: 1801px) {
108-
109-
.topnav img {
110-
margin-left:22%;
111-
}
112-
.topnav a.right {
113-
margin-right:22%;
114-
}
115-
116-
}
117-
118-
119-
@media print, screen and (max-width: 480px) {
120-
.topnav #myLinks {
121-
display: none;
122-
}
123-
}
27+
}
12428

125-
@media print, screen and (max-width: 960px) {
29+
/* Adjusts the right margin for alignment */
30+
.topnav a.right {
31+
margin-right: 0;
32+
}
12633

34+
/* Responsive design adjustments */
35+
@media screen and (max-width: 960px) {
12736
.topnav #myLinks {
12837
display: none;
129-
}
38+
}
13039

131-
.topnav a.normal {
40+
.topnav a.normal {
13241
color: white;
13342
float: none;
13443
padding: 14px 16px;
13544
text-decoration: none;
13645
font-size: 17px;
13746
display: block;
138-
}
47+
}
13948

140-
.topnav a.icon {
49+
.topnav a.icon {
14150
color: white;
14251
display: block;
14352
padding: 10px 16px;
@@ -146,17 +55,24 @@
14655
float: right;
14756
right: 0;
14857
top: 0;
149-
margin-right:5%;
150-
}
58+
margin-right: 5%;
59+
}
15160

152-
.topnav a.right {
61+
.topnav a.right {
15362
color: white;
15463
float: none;
15564
padding: 14px 16px;
15665
text-decoration: none;
15766
font-size: 17px;
15867
display: block;
159-
margin-right:0;
160-
}
161-
}
162-
68+
margin-right: 0;
69+
}
70+
}
71+
72+
/* Adjust image alignment inside the navigation bar */
73+
.topnav img {
74+
margin: 0; /* Removes any vertical margin */
75+
margin-left: 0; /* Removes the left margin */
76+
padding: 10px; /* Adds padding for spacing */
77+
vertical-align: middle; /* Aligns image vertically */
78+
}

0 commit comments

Comments
 (0)