Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

a:focus doesn't work for parent item of dropdown menu

         

deeper

2:51 pm on Apr 15, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi,
in my custom style sheet all links get a:focus (plus a:hover and a:active) and it works fine, except one menu item: the parent item of the dropdown (my main navigation has a small dropdown, expanding by hover):
Tabbing through the navigation, this parent item is skipped, "forgotten", it doesn't get the focus-styling.

The HTML-code of the parent item, like usual in WP:

<li id="menu-item-97" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-97"><a title="Untermenue">blabla</a> 
...(nested submenu with its own ul and li)...
</li>


I tried targetting especially this parent item with an additional "a:focus-styling", but
a[title="Untermenue"]:focus does not work.

Firebug shows me a class "sf-with-ul" (where does it come from?) for this parent link, but again no success with this selector.

Even without "href" the parent is a valid < a >-tag and it should be possible to give him a:focus, but how?