I got a menu and I would like to display the current page with different color of text, or a border bottom.
I know how to do this with different html files, though, the current website im working on, is on a single file, index.html. When I click on menu, it will scroll down to the specific tab.
Does anyone know any way of styling menu in a single file?
HTML:
<div id="menu">
<ul class="nav">
<li><a href="#section1" class="a">aaa</a></li>
<li><a href="#section2" class="b">bbb</a></li>
<li><a href="#section3" class="c">ccc</a></li>
<li><a href="#section4" class="d">ddd</a></li>
<li><a href="#section5" class="e">eee</a></li>
</ul>
</div>
CSS:
#menu ul li .a:hover {
color: #6D6D6D;
border-bottom: 2px solid #fcd017;
}
Currently I'm able to change it while hovering, but I would like to change it while i remain in the #section1 in this case.