SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2012
    Location
    Tucson, AZ
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WordPress/Responsive Navigation Losing Color when on Child Page

    I'm still working on my mobile navigation, and I ran across a weird problem. When you visit a parent page, the children links then show - just as I wanted. But when you visit a child page, the children navigation elements lose their color.

    When on child page:
    http://img217.imageshack.us/img217/6...20730at103.png

    How I want it to display/how it displays when on a parent page:
    http://img40.imageshack.us/img40/627...20730at103.png

    Link (pull to 480px or below)
    http://www.mcfaddengavender.net/newm...t/newmg/about/

    Any ideas?

    Thanks guys!

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,389
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    Hi,

    It looks as though you have set up rules for when the parent is active.

    e.g.

    Code:
    #main-nav_responsive .page-item-11.current_page_item a {
        background: none repeat scroll 0 0 #2CA7E1;
    }
    However when the child is the current item the cuurrent_page_item class is replaced by current_page_parent class so I would assume you need to target that in the same way.

    e.g.

    Code:
    #main-nav_responsive .page-item-11.current_page_item a,
    #main-nav_responsive .page-item-11.current_page_parent a {
        background: none repeat scroll 0 0 #2CA7E1;
    }
    And follow that through for the other items.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2012
    Location
    Tucson, AZ
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Worked like a charm. Thanks a ton Paul!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •