How do you add ID/Classes to wp_page_name list items
-
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
- tag which means this line wouldn’t work:
.nav .page-item-5 .current_page_item { background-position: 0 -60px; }
is there a way to add the current page class to the tag instead?
<li class="page-item-5 current_page_item"><a class="selected" ...>
or something to that effect?TIA
- tag which means this line wouldn’t work:
Viewing 1 replies (of 1 total)
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.