-
Notifications
You must be signed in to change notification settings - Fork 3
/
flexbox-nav-exercise.html
96 lines (94 loc) · 2.55 KB
/
flexbox-nav-exercise.html
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>navbar</title>
<link href="https://fonts.googleapis.com/css?family=Anonymous+Pro|Fugaz+One&display=swap" rel="stylesheet">
<style>
* {
box-sizing: border-box;
font-family: 'Anonymous Pro', monospace;
margin: 0;
}
nav {
display: flex;
justify-content: space-between;
align-content: center;
height: 5em;
background-color: #0fb784;
color: whitesmoke;
position: fixed;
width: 100%;
top: 0;
padding: 3px 10vw;
border-bottom: #373fff 3px solid;
box-shadow: 1px 0 12px #373fff;
}
ul {
list-style: none;
display: flex;
align-items: center;
justify-content: center;
padding: 0;
}
li {
display: inline-block;
margin: 1em;
text-shadow: 1px 1px #373fff;
}
nav a {
text-decoration: none;
color: whitesmoke;
display: flex;
justify-content: center;
align-items: center;
}
nav a:hover{
color: #373fff;
}
nav a:active{
color: orangered;
}
h2>a {
font-size: 2.2em;
position: absolute;
/*With The Calc Function Calc*/
top: calc(50% - 38px);
left: calc(50% - calc(117px / 2));
/* With Transform */
/*top: 50%;*/
/*left: 50%;*/
/*transform: translate(-50%, -50%);*/
font-family: 'Fugaz One', cursive;
text-shadow: 3px 3px #373fff;
}
h2>a:hover {
text-shadow: 3px 3px whitesmoke;
}
li>a:hover {
text-shadow: 1px 1px whitesmoke;
}
body{
background: #0fb784;
color: #0a1428;
}
</style>
</head>
<body>
<nav>
<ul>
<li><a href="#">Projects</a></li>
<li><a href="#">Articles</a></li>
<li><a href="#">Résumé</a></li>
</ul>
<h2>
<a href="#">Logo</a>
</h2>
<ul id="social">
<li><a href="#" target="_blank">Twitter</a></li>
<li><a href="https://www.linkedin.com/in/david-a-stephens/" target="_blank">LinkedIn</a></li>
<li><a href="#" target="_blank">Facebook</a></li>
</ul>
</nav>
</body>
</html>