I am facing an issue with my navigation bar. It is functioning properly, but I am unable to activate the :active pseudo-class for the anchor tags when clicked. Here is my HTML and CSS code along with what I am trying to achieve...
Below is the HTML section of my navigation:
<div class="navigation">
<input type="checkbox" class="navigation__checkbox" id="navi-toggle">
<label for="navi-toggle" class="navigation__button">
<span class="navigation__icon"> </span>
</label>
<div id="background" class="navigation__background"> </div>
<nav class="navigation__nav">
<ul class="navigation__list">
<li class="navigation__item"><a href="#" class="navigation__link">About Me</a></li>
<li class="navigation__item"><a href="#" class="navigation__link">Skills</a></li>
<li class="navigation__item"><a href="#projects" class="navigation__link">Projects</a></li>
<li class="navigation__item"><a href="#" class="navigation__link">Contact Me</a></li>
<li class="navigation__item"><a href="#" class="navigation__link">Message Me</a></li>
</ul>
</nav>
</div>
On clicking the hamburger button, the navigation expands. Clicking it again collapses the navigation. This behavior can be seen in the following SASS/CSS snippet:
.navigation {
.navigation__checkbox {
display: none;
}
// More CSS properties...
}
My objective is to replicate this functionality for the anchor tags within the navigation menu. I attempted to implement a similar approach without success. Any suggestions on how to achieve this would be greatly appreciated. Thank you.
If interested, please see the webpage for a better understanding of the issue at hand.