# Swapping font-color on click

**URL:** <https://forum.kirupa.com/t/swapping-font-color-on-click/273780>\
**Category:** web dev\
**Created:** [October 20, 2008, 8:08pm UTC](https://forum.kirupa.com/t/swapping-font-color-on-click/273780 "2008-10-20T20:08:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpearson311](https://avatars.discourse-cdn.com/v4/letter/j/977dab/32.png) [@jpearson311](https://forum.kirupa.com/u/jpearson311)\
**Post date:** [October 20, 2008, 8:08pm UTC](https://forum.kirupa.com/t/swapping-font-color-on-click/273780/1 "2008-10-20T20:08:18Z")

</div>

If I have a navigation menu that is styled with CSS and I want the font-color of one of the navigation elements to change on click, how can I do this? For example, if they are all styled to have a font-color of #333333 and when you roll over it, the font color changes to #b20000, but when you click on the link, I want the font-color to stay at #b20000 to show it as active, but then return to #333333 when you go to the next active page. Thanks!

JPearson311
