Having trouble changing the icons' state when they are clicked on. This navigation bar is being imported from different files.
Here is my code for the navigation bar:
.nav {
position: fixed;
top: 88%;
left: 12.5%;
right: 12.5%;
width: 75%;
bottom: 25px;
color: #70AD47;
height: 80px;
background: #eee;
box-shadow: 0 0 15px #ccc;
display: flex;
overflow-x: auto;
border-radius: 10px;
}
.nav__link {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
flex-grow: 1;
min-width: 50px;
overflow: hidden;
white-space: nowrap;
font-size: 13px;
color: #444444;
text-decoration: none;
-webkit-tap-highlight-color: transparent;
transition: background-color 0.1s ease-in-out;
}
.nav__link:hover:not(.active) {
background-color: #eeeeee;
}
.nav__link:active {
color: #70AD47;
}
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<nav class="nav">
<a href="assignment.php" class="nav__link">
<i class="material-icons nav__icon ">co_present</i>
<span class="nav__text">Conferene Room</span>
</a>
<a href="archive.php" class="nav__link ">
<i class="material-icons nav__icon">folder</i>
<span class="nav__text">Archive</span>
</a>
<a href="classroom.php" class="nav__link">
<i class="material-icons nav__icon">home</i>
<span class="nav__text">Home</span>
</a>
<a href="assignment.php" class="nav__link">
<i class="material-icons nav__icon">assignment</i>
<span class="nav__text">Assignment</span>
</a>
<a href="discussion.php" class="nav__link">
<i class="material-icons nav__icon">question_answer</i>
<span class="nav__text">Defense Discussion</span>
</a>
</nav>