Simple navigation bar
source code:
Html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<title>Animation</title>
</head>
<body>
<a href="/"><span>FaiZan</span></a>
<div class="nav">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/">Contact</a></li>
<li><a href="/">Blog</a></li>
<li><a href="/">About Us</a></li>
</ul>
</div>
<div class="box"></div>
</body>
</html>
CSS:
* {
margin: 0;
padding: 0;
font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
color: rgb(0, 0, 0);
}
body {
height: 100vh;
width: 100%;
position: relative;
}
.box {
height: 100%;
width: 100%;
}
.nav {
height: 50px;
width: 100vw;
display: flex;
justify-content: flex-end;
align-items: center;
position: absolute;
top: 0px;
box-shadow: 5px 5px 5px 4px rgb(105, 105, 103);
border-bottom: 2px solid rgb(182, 182, 182);
}
ul {
list-style-type: none;
display: flex;
}
li {
text-decoration: underline;
font-weight: 900;
font-size: 20px;
padding: 0px 23px;
}
body span {
display: flex;
justify-content: center;
align-items: center;
font-size: 35px;
font-weight: 900;
position: absolute;
z-index: 1;
padding-left: 20px;
letter-spacing: 1px;
text-decoration: none;
}

Comments
Post a Comment