WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] my li.current_page_item a text isn’t showing

[Resolved] my li.current_page_item a text isn’t showing

  • the current page background color seems to work, but the text on the hyperlink will not, even though it is set to “black”. however, when i hover over the hyperlink, the black text shows. i provided my code below.

    here is my css:

    #menu {width:950px; background:url(images/gray.jpg) repeat-x; margin-top:-20px;
    font:normal 14px arial, sans-serif; letter-spacing:1px; height:30px}
    #menu ul {list-style-type:none; margin:0 auto; padding:0; background:none;}
    #menu li {float:left; padding:7px 0px;}
    #menu li a {padding:7px 20px; color:white;}
    #menu li a:hover {background:white; text-decoration:none; color:black; }
    #menu li.current_page_item {background:white; color:black}
    #menu li.current_page_item a {color:black;}
    #menu li.current_page_item a:link {color:black;}
    #menu li.current_page_item a:active {color:black;}

    here is the php in header.php:
    <div id=”menu”>
    <?php wp_list_pages(‘sort_column=menu_order&depth=1&title_li=’); ?>
    </div><!– end menu –>

Viewing 3 replies - 1 through 3 (of 3 total)
  • i have set #menu li.current_page_item a {background:none} and it worked

    esmi

    @esmi

    Forum Moderator

    CSS without the context of the site is of no use. What might help is a link to a page demonstrating the problem.

    maybe it is because you forgot a “;” in

    #menu li.current_page_item {background:white; color:black}

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] my li.current_page_item a text isn’t showing’ is closed to new replies.
Skip to toolbar