• I’m using a single sprite for all the links in my menu and here’s my CSS

    .nav li a {
    	float:left;
    	height:0;
    	overflow:hidden;
    	width:100px;
    	padding-top:30px;
    	background-image:url(images/nav.png);
    	background-repeat:no-repeat;
    }
    .nav .page-item-5 a { background-position:0 0; }
    .nav .page-item-3 a { background-position:-200px 0; }
    .nav .page-item-2 a { background-position:-300px 0; }
    
    .nav .page-item-5 a:hover { background-position:0 -30px; }
    .nav .page-item-3 a:hover { background-position:-200px -30px; }
    .nav .page-item-2 a:hover { background-position:-300px -30px; }
    
    .nav .page-item-5 .current_page_item { background-position: 0 -60px; }
    .nav .page-item-3 a.selected { background-position:-200px -60px; }
    .nav .page-item-2 a.selected { background-position:-300px -60px; }

    the issue with wp_page_menu is the class on the

Viewing 1 replies (of 1 total)
  • You can’t add classes to the links generated by wp_page_menu. But why don’t you use something like:

    .nav .page-item-5 .current_page_item a:hover,.nav .page-item-5 .current_page_item a:active,.nav .page-item-5 .current_page_item a:focus { background-position: 0 -60px; }

Viewing 1 replies (of 1 total)
  • The topic ‘How do you add ID/Classes to wp_page_name list items’ is closed to new replies.