Category descriptions in menus
-
I’ve found that menu items created from Categories contain descriptions when they’re available. This is element with class wpbf-menu-description.
See my link – header menu under BLOG for example. Without my intervention, the Category description appeared within the submenu which does not look good and is confusing.
I could hide it with css if all else fails, but I’m wondering if there’s any way to use it. I tried to style the description to appear as a tooltip, but I find that only the description of the first item within the submenu is visible no matter which submenu item is being hovered over. I could refer to them by id but that wouldn’t be dynamic and would require maintenance whenever menu items change and I’d rather avoid that.
Any ideas?
For reference, css I’m using:
.menu-item .wpbf-menu-description{ font-family:"Open Sans"; font-variant: 300; font-size:small; visibility: hidden; width: 300px; background-color: #333; color: #fff; text-align: center; border-radius: 5px; padding: 5px ; position: absolute; z-index: 1; bottom: -50%; margin-left: -100px; opacity: 0; transition: opacity 0.3s; } .menu-item:hover .wpbf-menu-description{ visibility: visible; opacity: .9; }
The page I need help with: [log in to see the link]
- The topic ‘Category descriptions in menus’ is closed to new replies.