css - Need Help Figuring Out Admin Menu Hover Styling Class

I am building a plugin that part of it has to do with styling the WordPress Dashboard Admin menu. I have everything all

I am building a plugin that part of it has to do with styling the WordPress Dashboard Admin menu. I have everything all coded and working I am just stuck on this one piece.

I need to find the CSS class to override the background color when you hover over a menu item that has a submenu. For example, if you hover over "Plugins" and go to the submenu the background for the menu item "Plugins" is a black color. What is the CSS class to change that background color?

I have attached an image to reference:

I am building a plugin that part of it has to do with styling the WordPress Dashboard Admin menu. I have everything all coded and working I am just stuck on this one piece.

I need to find the CSS class to override the background color when you hover over a menu item that has a submenu. For example, if you hover over "Plugins" and go to the submenu the background for the menu item "Plugins" is a black color. What is the CSS class to change that background color?

I have attached an image to reference:

Share Improve this question asked Jul 10, 2018 at 0:58 Kevin W.Kevin W. 439 bronze badges 2
  • Update: I was able to find it. In case anyone in the future is looking for it, here it the class #adminmenu li.opensub>a.menu-top,#adminmenu li>a.menu-top:focus – Kevin W. Commented Jul 10, 2018 at 1:07
  • 1 Kevin: if you answered your own question, then it is useful to others to put your answer in the 'answer'. Along with how you figured out your answer. – Rick Hellewell Commented Jul 10, 2018 at 2:28
Add a comment  | 

1 Answer 1

Reset to default 1
#adminmenu li.menu-top:hover,
#adminmenu li.opensub>a.menu-top,
#adminmenu li>a.menu-top:focus {
    position: relative;
    background-color: #191e23;
    color: #00b9eb;
}

Make sure your plugin is using the structure:

<li> <- position within admin menu is as a list item, using the <li> tag.

    <a>LINK</a> <- main link

    <ul> <- submenu container
        <li><a>submenu item here</a></li>
    </ul>
</li>

ofc dont put anything with those <- bits inside the code, it's just an example of structure! Hope it helps

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745231119a4617682.html

相关推荐

  • css - Need Help Figuring Out Admin Menu Hover Styling Class

    I am building a plugin that part of it has to do with styling the WordPress Dashboard Admin menu. I have everything all

    3小时前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信