Skip to content

Commit

Permalink
Merge pull request #161 from venketeswar664/main
Browse files Browse the repository at this point in the history
resolved issued #12
  • Loading branch information
IshitaSatpathy authored Oct 14, 2022
2 parents 4947d99 + 655678d commit d97cb99
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 0 deletions.
46 changes: 46 additions & 0 deletions venketeswar rana/issue no.12/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<meta name="viewport" content=
"width=device-width,initial-scale=1.0">
<title>side navigation bar</title>
<script src="https://kit.fontawesome.com/bba3432f3f.js"
crossorigin="anonymous"></script>
<link rel="stylesheet" href="style.css">
</head>

<body>
<div class="header">
<div class="side-nav">
<ul class="nav-links">
<li><a href="#">
<i class="fa-solid fa-house-user"></i>
<p>Home</p>
</a>
</li>

<li><a href="#">
<i class="fa-solid fa-user"></i>
<p>About</p>
</a>
</li>
<li><a href="#">
<i class="fas fa-id-card-alt"></i>
<p>Login</p>
</a>
</li>

<li><a href="#">
<i class="fa fa-user-circle"></i>
<p>Contact us</p>
</a>
</li>
<div class="action"></div>
</ul>
</div>
</div>
</body>

</html>
85 changes: 85 additions & 0 deletions venketeswar rana/issue no.12/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}

.header {
width: 100%;
height: 100vh;
background: #f1f1dc;
}

.side-nav {
width: 250px;
height: 100%;
background: rgb(178, 239, 239);
position: fixed;
top: 0;
left: 0;
padding: 20px 30px;
}


.nav-links {
list-style: none;
position: relative;
}

.nav-links li {
padding: 10px 0;
}

.nav-links li a {
color: #000000;
text-decoration: none;
padding: 10px 14px;
display: flex;
align-items: center;
}

.nav-links li a i {
font-size: 22px;
margin-right: 20px;
}

.active {
background: #000000;
width: 100%;
height: 47px;
position: absolute;
left: 0;
top: 2.6%;
z-index: -1;
border-radius: 6px;
box-shadow: 0 5px 10px rgba(255, 255, 255, 0.4);
display: none;
transition: top 0.5s;
}

.nav-links li:hover a {
color: #fff;
transition: 0.3s;
}

.nav-links li:hover~.active {
display: block;
}

.nav-links li:nth-child(1):hover~.action {
top: 2.6%;
}

.nav-links li:nth-child(2):hover~.action {
top: 30.2%;
}

.nav-links li:nth-child(3):hover~.action {
top: 50.8%;
}

.nav-links li:nth-child(4):hover~.action {
top: 78.4%;
}

0 comments on commit d97cb99

Please sign in to comment.