WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] current page css style

[Resolved] current page css style

  • bigshift
    Member

    @bigshift

    Hello all.

    I am obviously not searching for what I am looking for properly because I can’t seem to find what I am looking for, and I know it can’t be as complicated as I am making it.

    Essentially, I have my nav items, sub nav items etc. no biggie, and css for them active, hover, etc. BUT, I want to assign a style to the page that is currently active in WP and I am not sure what I should be looking for.

    Again, I know, probably a simple request, I’m just asking/searching for it incorrectly.

    Appreciate any assistance.
    Thanks
    James

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi
    Forum Moderator

    @esmi

    Try styling on .current_page_item and/or .current-cat.

    bigshift
    Member

    @bigshift

    Thanks esmi.. that did the trick.

    Not for me it didn’t.

    I do have Nice Navigation plugin by eskapism to collapse/ expand my page links.
    Not sure if it’s the plugin that makes the current page link bold. I don’t think it was before.

    Anyway I tried

    #sidebar a, #sidebar a:visited{
    color: #339933;
    text-decoration: none;
    }
    #sidebar a:hover{
    color: #cc3333;
    text-decoration: none;
    }
    #current_page_item a:active{
    color: #cc3333;
    font-weight:bold

    But they all stay stubbornly green – the brown hover colour works but not the current_page_item.

    I couldn;t find a way to contact the plugin dev either.

    Hey @shanj, you are calling current_page_item as a ID (#) but it’s a CLASS (.)

    Try to put this: .current_page_item a:active instead #current_page_item a:active

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] current page css style’ is closed to new replies.