Problem with wordpress and CSS (nav_menus, current-menu-item)
I'm currently working on a website for my bookkeeping website. Here I am trying to make it so that the current-menu-item is a different color than the other menu items in the main menu.
I have enabled wp_nav_menus in the wordpress theme, this generates the following output for the current page
|
<div id="headmenu"> <div class="menu-header"> <ul id="menu-nav" class="menu"> <li id="menu-item-23" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-10 current_page_item menu-item-23"> |
So far so good. Now I wish to turn to the CSS. In the theme there is a load of settings for the menu, and a few for a:hover (I wish to use the ones for a:hover on the current-menu-item)
|
#headmenu { font-family: verdana, arial, sans-serif; font-size:16px; width:775px; letter-spacing:-1px; font-weight:bold; float:none; margin:30px 0 0 0; color:#fff; overflow:hidden; } #headmenu a { color:#000; background:#fff; padding:3px 10px 2px 10px; margin:0 0 0 3px; line-height:21px; opacity: 0.8;filter:alpha(opacity=80);zoom:1; -webkit-border-top-left-radius:5px; -webkit-border-top-right-radius:5px; -webkit-border-bottom-left-radius:0px; -webkit-border-bottom-right-radius:0px; -khtml-border-radius-topleft:5px; -khtml-border-radius-topright:5px; -khtml-border-radius-bottomleft:0px; -khtml-border-radius-bottomright:0px; -moz-border-radius-topleft:5px; -moz-border-radius-topright:5px; -moz-border-radius-bottomleft:0px; -moz-border-radius-bottomright:0px; } #headmenu a:hover {text-decoration:none; color:#fff; background:#000;} |
| #headmenu a .current-menu-item {text-decoration:none; color:#fff; background:#000;} |
Thanks
*NEW* Learn ClickBump! | Get ClickBump Theme WSO | Get ClickBump SEO!
Live Demos: "Perfect Silo" | Killer "Landing Page" | Mashable Skin
Watch ClickBump Smoke Thesis/Genesis