How to have a button's color change depending on the active page?

hello, i have navigation button’s at the top of the page which colour’s i would like to change depending on which page i am on. for example: the home button’s text colour must be orange when i am on the home page. while the about button and the register button should be white. Then when i click the about button and it takes me to the about page, the home button and register button should be white while the about button’s text is now orange. thank you Nox VidMate

complete newbie here, im doing this for a project and cannot find this specific thing online. im using html and have an external style sheet and so far everything is looking good, i can add what i need to add im just having trouble finding the option or way to set the button’s text colour based on the page

1 Like

Don’t worry it’s simple, just set the one’s background-color CSS property to the desired color.
For example I’m editing the homepage:

<div id="homeIcon" class="fas fa-home" style="background-color: orange"></div>
<div id="registerIcon" class="fas fa-cash-register" style="background-color: white"></div>

(The classes are those because they would be font awesome icons)
So when you are editing the register page you would set the register icon to orange and the other ones to white

Hope this helps :grinning: