Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS nav background color after click

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #39864

    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

    #110147
    chrisburton
    Participant

    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;}`

    #115353

    Thank you both :-)

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.