The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › nav background color after click
I created a hover effect for my nav links. I want the hover background color to stay after the user has clicked a particular nav link, so it will show them the site area they are in. This site does that, as do a number of others. How is it done?
Thanks for any help!
-Margaret
Also, if you’re using WordPress you can just target the body class/ID to set the active class.
Example: `body.page-id-1 .active {color: red;}`
Thank you both :-)