Skip to content

Commit bdb7cfc

Browse files
authored
header css changes
1 parent c00dcaf commit bdb7cfc

File tree

1 file changed

+56
-2
lines changed

1 file changed

+56
-2
lines changed

styles/styles.css

+56-2
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ body.appear {
7373
display: block;
7474
}
7575

76-
header {
76+
/*header {
7777
height: var(--nav-height);
78-
}
78+
}*/
7979

8080
h1, h2, h3,
8181
h4, h5, h6 {
@@ -208,3 +208,57 @@ main .section.light,
208208
main .section.highlight {
209209
background-color: var(--light-color);
210210
}
211+
212+
/* Style the header with a grey background and some padding */
213+
.header {
214+
overflow: hidden;
215+
background-color: #f1f1f1;
216+
padding: 20px 10px;
217+
}
218+
219+
/* Style the header links */
220+
.header a {
221+
float: left;
222+
color: black;
223+
text-align: center;
224+
padding: 12px;
225+
text-decoration: none;
226+
font-size: 18px;
227+
line-height: 25px;
228+
border-radius: 4px;
229+
}
230+
231+
/* Style the logo link (notice that we set the same value of line-height and font-size to prevent the header to increase when the font gets bigger */
232+
.header a.logo {
233+
font-size: 25px;
234+
font-weight: bold;
235+
}
236+
237+
/* Change the background color on mouse-over */
238+
.header a:hover {
239+
background-color: #ddd;
240+
color: black;
241+
}
242+
243+
/* Style the active/current link*/
244+
.header a.active {
245+
background-color: dodgerblue;
246+
color: white;
247+
}
248+
249+
/* Float the link section to the right */
250+
.header-right {
251+
float: right;
252+
}
253+
254+
/* Add media queries for responsiveness - when the screen is 500px wide or less, stack the links on top of each other */
255+
@media screen and (max-width: 500px) {
256+
.header a {
257+
float: none;
258+
display: block;
259+
text-align: left;
260+
}
261+
.header-right {
262+
float: none;
263+
}
264+
}

0 commit comments

Comments
 (0)