|
1 |
| -/* Add a black background color to the top navigation */ |
| 1 | +/* Fixed navigation bar at the top */ |
2 | 2 | .topnav {
|
3 | 3 | background-color: #13294B;
|
4 | 4 | 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 */ |
17 | 11 | }
|
18 | 12 |
|
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 { |
27 | 15 | float: right;
|
28 | 16 | color: #f2f2f2;
|
29 | 17 | text-align: center;
|
30 | 18 | padding: 10px 9px;
|
31 | 19 | text-decoration: none;
|
32 | 20 | 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 { |
37 | 25 | background-color: #ddd;
|
38 | 26 | 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 | +} |
124 | 28 |
|
125 |
| - @media print, screen and (max-width: 960px) { |
| 29 | +/* Adjusts the right margin for alignment */ |
| 30 | +.topnav a.right { |
| 31 | + margin-right: 0; |
| 32 | +} |
126 | 33 |
|
| 34 | +/* Responsive design adjustments */ |
| 35 | +@media screen and (max-width: 960px) { |
127 | 36 | .topnav #myLinks {
|
128 | 37 | display: none;
|
129 |
| - } |
| 38 | + } |
130 | 39 |
|
131 |
| - .topnav a.normal { |
| 40 | + .topnav a.normal { |
132 | 41 | color: white;
|
133 | 42 | float: none;
|
134 | 43 | padding: 14px 16px;
|
135 | 44 | text-decoration: none;
|
136 | 45 | font-size: 17px;
|
137 | 46 | display: block;
|
138 |
| - } |
| 47 | + } |
139 | 48 |
|
140 |
| - .topnav a.icon { |
| 49 | + .topnav a.icon { |
141 | 50 | color: white;
|
142 | 51 | display: block;
|
143 | 52 | padding: 10px 16px;
|
|
146 | 55 | float: right;
|
147 | 56 | right: 0;
|
148 | 57 | top: 0;
|
149 |
| - margin-right:5%; |
150 |
| - } |
| 58 | + margin-right: 5%; |
| 59 | + } |
151 | 60 |
|
152 |
| - .topnav a.right { |
| 61 | + .topnav a.right { |
153 | 62 | color: white;
|
154 | 63 | float: none;
|
155 | 64 | padding: 14px 16px;
|
156 | 65 | text-decoration: none;
|
157 | 66 | font-size: 17px;
|
158 | 67 | 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