Forums

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

Home Forums Back End WordPress – How to Style the Children of current_page_item

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26432
    bonniegomes
    Member

    Hi everyone,

    I have a question that I hope someone can help me with.

    I’m using wp_list_pages to generate my navigation. It’s a vertical list. Here is the code generated.

    And here’s the CSS that makes the background of the current page link change colour:

    Code:
    #main-nav li.current_page_item a { background-color:#CCC; }

    Problem is: When you’re on the "Accommodation" page, the "Accomodation" link background colour changes but so does the links for the 3 rooms as well.

    I’ve tried a bunch CSS to try and remove the styling of the children of current_page_item but none work.

    Please note it works fine when your on a room page. ie only the room link changes colour.

    Any help would be very much appreciated!

    PS I had to login to this forum 4 times to post this.

    #65447
    bonniegomes
    Member

    Oh boy… my bad. Stupid mistake on my behalf. Spelling mistake in the CSS. Sorry to waste peoples time. Can we delete this post?

    Thanks Apostrophe.

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