WordPress 3.0 menu-item…different image based on id
-
Ok I am trying to shortcut all the CSS involved with a rounded corner tab for my active page…
Since in the new menu system your menu items have a generated ID is there a way in css to target the current menu item, so that I can add a background image to only the current-menu items id?
For example…
I have a generated ID of menu-item-31 the text for this link is 20px wide so I make my rounded corner image 20px wide and use it only when that page is active…basically instead of:
#my-menu li.current-menu-item a {background: url(images/rounded-corner.png) no-repeat;}
it would be something like:
#menu-item-31.current a {background: url(images/rounded-corner-31.png) no-repeat;}
Which obviously doesn’t work and I have tried a few variations just not sure if something like that is even possible and I should stop trying…I just HATE dealing with rounded corners and I only need the tab for the active page not the entire menu!
Thanks for any input…
- The topic ‘WordPress 3.0 menu-item…different image based on id’ is closed to new replies.