WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] please help me with current_page_parent (5 posts)

  1. agatha83
    Member
    Posted 4 years ago #

    I have a problem with my 3 level menu. I would like all active links to be pink.
    I worked it out for the first level of the navigation but as soon as i click on a link in the 2nd level all links in the third level are pink too, although i would like to have only the active link there to be pink.
    I tried out a lot with current_page_parent and current_page_ancestor but it's still not working.

    Help is greatly appreciated.

    my css:

    #leftcol{ width:205px; float:left; position:relative; padding:10px 0px 20px 25px;}
    #leftcol h1, #leftcol h2, #leftcol h3, #leftcol h4, #leftcol h5, #leftcol h6 {font-family:arial; color:#000000; font-size:15px; margin:0px; padding:0px 0px 3px 0px;}

    #leftcol ul {padding: 0px 0px 0px 0px; margin: 0px 0px 0px 0px;list-style: none; width:180px; clear:both;}
    #leftcol ul li{margin: 0px 0px 0px 0px; display: block; font-family: arial; font-size: 14px; text-decoration:none; font-weight:bold;}
    #leftcol ul li a{ width: 149px; display: block; background:url(img/menu_li.gif) top left no-repeat; padding: 6px 5px 3px 26px; text-decoration:none; color:#000000; vertical-align: bottom;}
    #leftcol ul li a:hover{ background-repeat: no-repeat; background-position: -300px 0px; background-image:url(img/menu_li.gif); text-decoration:none; color:#FF0099; }

    #leftcol ul li ul{margin: 0px 0px 0px 10px; display: block; font-family: arial; text-decoration:none; font-weight:bold;}
    #leftcol ul li ul li{margin: 0px 0px 0px 0px; display: block; font-family: arial; font-size: 14px; text-decoration:none; font-weight:bold;}
    #leftcol ul li ul li a{ width: 140px; display: block; background:url(img/menu_li_sml.gif) top left no-repeat; font-size: 12px;padding: 6px 5px 3px 25px; text-decoration:none; color:#000000; vertical-align: bottom;}
    #leftcol ul li ul li a:hover{ background-repeat: no-repeat; background-position: -300px 0px; background-image:url(img/menu_li_sml.gif); text-decoration:none; color:#FF0099; }

    #leftcol ul li ul li ul{margin: 0px 0px 0px 10px; display: block; font-family: arial; text-decoration:none; font-weight:bold;}
    #leftcol ul li ul li ul li a{ width: 130px; display: block; background:url(img/menu_li_sml.gif) top left no-repeat; font-size: 11px; padding: 6px 5px 3px 25px; text-decoration:none; color:#000000; vertical-align: bottom;}
    #leftcol ul li ul li ul li a:hover{ background-repeat: no-repeat; background-position: -300px 0px; background-image:url(img/menu_li_sml.gif); text-decoration:none; color:#FF0099; }

    #leftcol a{ font-family: arial; text-decoration:none; color:#000000;}
    #leftcol a:hover{ font-family: arial; text-decoration:none; color:#FF0099;}
    #leftcol .current_page_item a { background-repeat: no-repeat; background-position: -300px 0px; background-image:url(img/menu_li.gif); font-family: arial; text-decoration:none; color:#FF0099; }

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Please don't post huge chunks of CSS. A link to the site in question is often all that is needed.

  3. agatha83
    Member
    Posted 4 years ago #

    sorry

    this is the link
    http://thelondonlife.de/?page_id=25

  4. esmi
    Forum Moderator
    Posted 4 years ago #

    Try adding:
    #leftcol .current_page_item ul a {color:#000;}

    to the bottom of style.css

  5. agatha83
    Member
    Posted 4 years ago #

    thanks so much!it's working perfectly now :D

Topic Closed

This topic has been closed to new replies.

About this Topic